Re: lazy symbol binding failed - on MacOSX 10.7 and 10.8

2013-03-18 Thread Russ Allbery
Satz Klauer writes: > This line looks a bit strange to me: > libtool: link: g++ -g -O2 -Wl,-whole-archive -Wl,-no-whole-archive -o > .libs/baz baz.o -Wl,-bind_at_load ../foo/libfoo.a > ../bar/.libs/libbar.dylib > g++ looks like some GCC-type compiler, so GNU-specifics should not be > a problem

Re: lazy symbol binding failed - on MacOSX 10.7 and 10.8

2013-03-18 Thread Peter Johansson
On 3/18/13 8:39 PM, Satz Klauer wrote: This line looks a bit strange to me: libtool: link: g++ -g -O2 -Wl,-whole-archive -Wl,-no-whole-archive -o .libs/baz baz.o -Wl,-bind_at_load ../foo/libfoo.a ../bar/.libs/libbar.dylib That looks strange indeed. Is libtool shuffling around the order of com

Re: lazy symbol binding failed - on MacOSX 10.7 and 10.8

2013-03-18 Thread Satz Klauer
This line looks a bit strange to me: libtool: link: g++ -g -O2 -Wl,-whole-archive -Wl,-no-whole-archive -o .libs/baz baz.o -Wl,-bind_at_load ../foo/libfoo.a ../bar/.libs/libbar.dylib g++ looks like some GCC-type compiler, so GNU-specifics should not be a problem!? Nevertheless I don't know what

Re: lazy symbol binding failed - on MacOSX 10.7 and 10.8

2013-03-18 Thread Peter Johansson
On 3/18/13 4:03 PM, Satz Klauer wrote: It is not a libtool-specific thingy, you have to use these linking options: -Wl,-whole-archive -lyourlib.a -lyourlib2.a -Wl,-no-whole-archive This includes your static libraries libyourlib1.a and libyourlib2.a into the shared library. Please do not forget