[A-a-p-user] Archiving last step
Brought to you by:
vimboss
From: Bram N. <bn...@gm...> - 2005-09-02 11:15:58
|
Hi. I use sepereate files for my functions, and in the last linking phase, a-a-p will run g++ -o mainprogram mainprogram.o object1.o object2.o object3.o However, the function defined in object2 might not be used by mainprogram.o. This will create a larger binary then necesarry. The solution to this problem is an intermediat archive "ar ru mainprogram.a object1.o object2.o object3.o" (not totally sure about the ar command) and then do the final link phase with "g++ -o mainprogram mainprogram.o mainprogram.a" the executable will be smaller then using the seperate objects. How can I add this to my aap program-rule? Greetings, Bram |