You only need to include the FPmath lib in a uses clause. You'll have access to all it's routines, even if you do not see them in Library Manager. All other libs are replacements, so they're known to compiler and governed by Library Manager.sem wrote:Ok... I would like to know how to use the "unofficial" unit of mikropascal pro.
I had unzipped and copy to the P18 folder.
Now , i use in a "uses" part, " uses __Lib_Conversions,__Lib_MathDouble, fpmath;"
I can see the new functions in the library manager, but there is not the MATH functions in the library7 manager.
Why? Where i can found int, trunc, round functions ?
Thanks, Sem
To have the FPmath lib treated in the same way, i.e. visible in Library Manager, you'd have to modify the .mlk file of the processor you use. It's described in Help, but I'll try to make it easier for you.
Find in mP installation directory a subdirectory called Defs. There you'll find the .mlk file of your processor. Lets assume you use PIC18F4620. It's file is called P18F4620.mlk. Open it in simple text editor, like Notepad, and you'll see the details of processor description. Search for LIBRARIES. Every lib appropriate for this processor is listed with it's filename, alias and category (SYSTEM or REGULAR). All you need to do is to add the following
Code: Select all
<LIB>
<ALIAS>FP_math</ALIAS>
<FILE>fpmath</FILE>
<TYPE>REGULAR</TYPE>
</LIB>