How to build a library in Code Warrior 5.0

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

How to build a library in Code Warrior 5.0

ソリューションへジャンプ
3,188件の閲覧回数
tranvkhoa
Contributor I
Hello
 
I'm using Code Warrior 5.0 for developing CAN driver for HC08GZ60, now I want to build this driver into a library (lib file) in order to use in another CAN application. Could you please tell me how to do this? I cannot find the option to do this in CW.
 
Thanks,
Khoa Tran 
ラベル(1)
タグ(1)
0 件の賞賛
返信
1 解決策
1,326件の閲覧回数
BlackNight
NXP Employee
NXP Employee
Hello,
Go to the project settings/preference panel and in Target > Target Settings > Linker set the linker to "Libmaker for ...." and it will create a library for you.

Erich

元の投稿で解決策を見る

0 件の賞賛
返信
3 返答(返信)
1,327件の閲覧回数
BlackNight
NXP Employee
NXP Employee
Hello,
Go to the project settings/preference panel and in Target > Target Settings > Linker set the linker to "Libmaker for ...." and it will create a library for you.

Erich
0 件の賞賛
返信
1,326件の閲覧回数
tranvkhoa
Contributor I
Dear Erich
 
Thanks for your quick answer. I can make a library now.
I have another question, when using this library (lib file) in the new project, do I need any other dependencies such as the header files, etc?
 
Thanks,
Khoa
0 件の賞賛
返信
1,326件の閲覧回数
BlackNight
NXP Employee
NXP Employee
Hi Khoa,
you have two choices:
- add the .lib file to the project (like a 'true' library): then it is simply using that .lib file and linking it to your elf file/application file. If you do changes in the files creating the library or in your library project, the library will not be re-built. That's useful in case you want to keep the library 'stable'.
- the other thing is you want to rebuild the library whenver something for the library changes. For this add the .mcp (project file) to your application project. Then the build system will check/build the 'subproject' and rebuild the library if needed. If you want to do this, make sure that you go to the 'Targets' Tab of your project and enable the dot under the 'link chain' column: with this the output file of your sub project (the library) will be added to your 'master project'.

This sounds maybe a little bit complicated (gee, a picture here would be easier to understand this), but otherwise you can go into the CW help file index and see what is documented there under the 'subproject' keyword?

Erich
0 件の賞賛
返信