Using math.h library with MCF5213

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

Using math.h library with MCF5213

ソリューションへジャンプ
2,125件の閲覧回数
albert_udl
Contributor I

Hi,

 

I am trying to use functions from the math library in MCF5213 and I always get the same error:

 

Error   : Undefined : "exp"
Project_3.c line 50   Referenced from "main" in

Link failed.

 

The library is properly include with: #include <math.h> . Is it necessary to set the -lm parameter in the compiler? And if so, how to do it?

 

Thanks a lot,

 

 

Albert

ラベル(1)
タグ(1)
0 件の賞賛
返信
1 解決策
1,037件の閲覧回数
J2MEJediMaster
Specialist I

OK, you've added the header file to your source code, but have you added the proper library to the project that provides the math functions you need? The choice of MCF5213 uses a reduced set library by default. You will have to select a different library to obtain the math capabilities that you need. Consult the ColdFire Build Tools Reference manual, located as ColdFire_Build_Tools_reference.pdf in the Help directory of your CodeWarrior installation. Check out the chapter ColdFire Runtime Libraries, paying particular attention to the Reduced Working Set Libraries section.

 

---Tom

元の投稿で解決策を見る

0 件の賞賛
返信
1 返信
1,038件の閲覧回数
J2MEJediMaster
Specialist I

OK, you've added the header file to your source code, but have you added the proper library to the project that provides the math functions you need? The choice of MCF5213 uses a reduced set library by default. You will have to select a different library to obtain the math capabilities that you need. Consult the ColdFire Build Tools Reference manual, located as ColdFire_Build_Tools_reference.pdf in the Help directory of your CodeWarrior installation. Check out the chapter ColdFire Runtime Libraries, paying particular attention to the Reduced Working Set Libraries section.

 

---Tom

0 件の賞賛
返信