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.
已解决! 转到解答。
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:
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
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:
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