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

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

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

Jump to solution
1,002 Views
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 Kudos
1 Solution
979 Views
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

View solution in original post

0 Kudos
2 Replies
980 Views
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 Kudos
1,001 Views
jasonhd
Contributor III

jasonhd_0-1602467230673.png

jasonhd_1-1602467291054.png

 

 

0 Kudos