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,133 次查看
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,110 次查看
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,111 次查看
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,132 次查看
jasonhd
Contributor III

jasonhd_0-1602467230673.png

jasonhd_1-1602467291054.png

 

 

0 项奖励
回复