Link Error: undefined 'sqrt', 'sin', 'cos', 'fabs'

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Link Error: undefined 'sqrt', 'sin', 'cos', 'fabs'

Jump to solution
1,232 Views
zili
Contributor II

The CodeWarrior IDE version is 5.9.0.

Even if 'math.h' is included, the Link error still appears, while there is no problem with compiling.

0 Kudos
1 Solution
1,016 Views
stanish
NXP Employee
NXP Employee

Hi,

First please check your compiler floating point setup:

If you don't require double precision floating point I'd recommend you to select "SPFP_Only" option since it generate most efficient SPFP code.

pastedImage_1.png

Next step is to add proper standard libraries (MSL + Runtime) that match with floating point option selected.

e.g.for VLE project,where char = unsigned char, and SPFP_Only floating point selected:

Use this runtime library:

"<CW for MPC55xx and MPC56xx 2.10>\PowerPC_EABI_Support\Runtime\Lib\Runtime.PPCEABI.V.SP.UC.a"

 

And this MSL library:

 

"<CW for MPC55xx and MPC56xx 2.10>\PowerPC_EABI_Support\MSL\MSL_C\PPC_EABI\Lib\MSL_C.PPCEABI.bare.V.SP.UC.a"

 

pastedImage_2.png

 

For more information about the libraries available please see the Build tools reference manual:

"<CW for MPC55xx and MPC56xx 2.10>\Help\PDF\Power Architecture Build Tools Reference.pdf", sections "Choosing an MSL Library", "Choosing a Runtime Library".

 

Hope it helps.

Stan

View solution in original post

0 Kudos
3 Replies
1,017 Views
stanish
NXP Employee
NXP Employee

Hi,

First please check your compiler floating point setup:

If you don't require double precision floating point I'd recommend you to select "SPFP_Only" option since it generate most efficient SPFP code.

pastedImage_1.png

Next step is to add proper standard libraries (MSL + Runtime) that match with floating point option selected.

e.g.for VLE project,where char = unsigned char, and SPFP_Only floating point selected:

Use this runtime library:

"<CW for MPC55xx and MPC56xx 2.10>\PowerPC_EABI_Support\Runtime\Lib\Runtime.PPCEABI.V.SP.UC.a"

 

And this MSL library:

 

"<CW for MPC55xx and MPC56xx 2.10>\PowerPC_EABI_Support\MSL\MSL_C\PPC_EABI\Lib\MSL_C.PPCEABI.bare.V.SP.UC.a"

 

pastedImage_2.png

 

For more information about the libraries available please see the Build tools reference manual:

"<CW for MPC55xx and MPC56xx 2.10>\Help\PDF\Power Architecture Build Tools Reference.pdf", sections "Choosing an MSL Library", "Choosing a Runtime Library".

 

Hope it helps.

Stan

0 Kudos
1,016 Views
zili
Contributor II

Hi Stan,

It's working fine now. Thank you very much.

0 Kudos
1,016 Views
Carlos_Mendoza
NXP Employee
NXP Employee


Hi zili,

Could you tell us which MCU are you using?

Thanks in advance!

Best Regards,
Carlos Mendoza
Technical Support Engineer

0 Kudos