command line linker

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

command line linker

2,063 次查看
Veter
Contributor I
what is command to add compiled object *.o to existing *.lib library file?
标签 (1)
标记 (1)
0 项奖励
4 回复数

503 次查看
Veter
Contributor I
I am using Code Warrior Development Studio for ColdFire Architectures Version 6.3, Build 14
I wrote a batch file that takes one argument (name of compiled source *.o) and creates a *.lib library.
This batch should be executed several times for different *.o sources, with every execution adding source to the *.lib.
Every time I execute it, it overwrites content of the *.lib with new source content. What is the command that appends *.o to the library?
 
My command line example: mwldmcf -o *.lib -v -g -w on -proc MCF5307 -library %1.o >> lib.err
0 项奖励

503 次查看
Veter
Contributor I

According to the Freescale support, apparently there is no way to add or link compiled objects into library incrementally using mwldmcf library maker. Unlike Borland’s tlib or Microsoft’s lib or many other library makers, Freescale can’t figure it out yet.

 

To create library in only way allowed with linker for ColdFire use the following command:

mwldmcf -o [filename].lib -v -g -w on -proc [target] -library *.o >> [filename].err

0 项奖励

503 次查看
CrasyCat
Specialist III
Hello
 
If you need to add single object file incrementally to your library, the only solution I can see is to use the ar utility that comes with cygwin.
 
This utility is more flexible than the CodeWarrior command line linker to create archive (library).
 
CrasyCat
0 项奖励

503 次查看
CrasyCat
Specialist III
Hello
 
This depends on many parameters.
 
- Which CPU are you targeting (HC08, HC12, Coldfire, ..)
- Which version of CodeWarrior are you using?
  To retrieve that info:
    - Start CodeWarrior
    - Select Help -> About Freescale CodeWarrior
    - Click on "Install Products"
    - CodeWarrior version used is displayed on top in the Installed Products dialog.
- Are you building from command line or from the IDE?
 
CrasyCat
0 项奖励