How to use a .a static library file created by CW v2.10 in CodeWarrior v11.0?

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

How to use a .a static library file created by CW v2.10 in CodeWarrior v11.0?

ソリューションへジャンプ
1,044件の閲覧回数
jasonhd
Contributor III

Hello everyone!

I am migrating a mpc5634m project created by CodeWarrior v2.10 to CodeWarrior v11.0 .a encapsulated static library file is used in the old project. How can this file be used in CodeWarrior v11.0? Now, after compiling, the error has been reported. The function defined in the .a  file cannot be found.

I added .a file in this setting. It seems useless, and the compilation result has not changed.

0 件の賞賛
1 解決策
1,021件の閲覧回数
stanish
NXP Employee
NXP Employee

Hi Jasonhd,

according to the screenshots you added the library correctly.

The compiler is complaining about the prototypes which are not declared.

There is a difference in default options (CW 2.10 vs CW MCU 11.x).

CW11.1 project for mpc5xxx requires function prototypes in contrast to CW 2.10. You can change this option see below:

stanish_0-1602679354594.png

 

Anyway good practice is that your .c file(s) that calls library functions should include the .h header file with function prototypes that belongs to the library. 

Hope it helps.

Stan

元の投稿で解決策を見る

0 件の賞賛
2 返答(返信)
1,022件の閲覧回数
stanish
NXP Employee
NXP Employee

Hi Jasonhd,

according to the screenshots you added the library correctly.

The compiler is complaining about the prototypes which are not declared.

There is a difference in default options (CW 2.10 vs CW MCU 11.x).

CW11.1 project for mpc5xxx requires function prototypes in contrast to CW 2.10. You can change this option see below:

stanish_0-1602679354594.png

 

Anyway good practice is that your .c file(s) that calls library functions should include the .h header file with function prototypes that belongs to the library. 

Hope it helps.

Stan

0 件の賞賛
1,043件の閲覧回数
jasonhd
Contributor III

jasonhd_0-1602467230673.png

jasonhd_1-1602467291054.png

 

 

0 件の賞賛