command line linker

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

command line linker

2,049 Views
Veter
Contributor I
what is command to add compiled object *.o to existing *.lib library file?
Labels (1)
0 Kudos
4 Replies

489 Views
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 Kudos

489 Views
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 Kudos

489 Views
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 Kudos

489 Views
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 Kudos