Jump to content
Sign in to follow this  
joli

Float lib within mplab x

Recommended Posts

Is there any trick for float lib to work with mplab x?

The code below compiles ok in sourceboost editor but not in mplabx.

#include <system.h>
#include <float.h>
void main()
{
    float f = float32_mul(2.5, 2.5);
}    

Here is some errors when compiling this code in mplabx ide:

Error: Unresolved external function:'__mul_32_32(unsigned long,unsigned long)'

... same error above repeated n times !

Error: Unresolved external symbol, function:__mul_32_32

... same error above repeated n times !

make[2]: *** [dist/default/production/float.X.production.hex] Error -2
make[1]: *** [.build-conf] Error 2
make: *** [.build-impl] Error 2

BUILD FAILED (exit value 2, total time: 5s)

float.pic18.lib was included as explained in the FoatMath.pdf page 9

  • PIC18LF67K40 / c++ pro licence / sourceboost 4.43 / mplab x 4.15

 

Edited by joli
some clarifications

Share this post


Link to post
Share on other sites

Answering to my self.

Its working now.

Under mplabx the libraries should be added to the project through Project Properties and add it to BoostLink / Additional options.

By the way, the compiler/linker finish the job in about 3 minutes > 72 module_files / 273 functions - 4 core, i7, 2.8GHZ, 16gb_ram

The compiler takes 30 seconds. The rest of the time is spent by the linker (2.5 minutes)... It would be great if linker could be improved.

Share this post


Link to post
Share on other sites

We would like to reproduce this and we don't need your source code.  Please email your project obj files and linker command line to support@sourceboost.com

 

Regards,

Pavel

Share this post


Link to post
Share on other sites

Your content will need to be approved by a moderator

Guest
You are commenting as a guest. If you have an account, please sign in.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoticons maximum are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
Sign in to follow this  

×