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

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

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

ソリューションへジャンプ
1,268件の閲覧回数
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 件の賞賛
1 解決策
1,052件の閲覧回数
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 件の賞賛
3 返答(返信)
1,053件の閲覧回数
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 件の賞賛
1,052件の閲覧回数
zili
Contributor II

Hi Stan,

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

0 件の賞賛
1,052件の閲覧回数
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 件の賞賛