Comment 2 for bug 594395

Revision history for this message
Jan (jan-ellenbeck) wrote :

After some more testing, I found (by trial and error) the following linker command line that successfully links one big static binary that has no further external (e.g. boost, python etc.) dependencies:

g++ -o .build/dbg/openwns-application/openwns -Wl,--whole-archive -lcopper -lofdmaphy -lwifimac -lwimac -lip -lconstanze -lrise -ltcp -lwns -lglue -ldllbase -lsimpletl -Wl,-disable-new-dtags .build/dbg/openwns-application/src/Main.o -Lsandbox/dbg/lib -lboost_filesystem-mt -lboost_program_options-mt -lm -ldl -lpython2.6 -lutil -lboost_date_time-mt -lpthread -lcppunit -lboost_signals-mt -Wl,-zmuldefs -static -lz -lssl -lcrypto -lboost_system -Wl,-no-whole-archive -lc

The above is an alternative fix to this bug: https://bugs.launchpad.net/openwns-application/+bug/322715 which was fixed - as far as I see - by introducing the -Wl,-no-whole-archive flags that lead to not including all these external libs.

Cheers
Jan