Hi libtoolers,I've encontered a problem on newer OSX (10.7 and 10.8) when mixing a static library (libfoo) and a dynamic library (libbar). The dynamic library is created with libtool so there is a libbar.la file whereas for the static library there is no .la file. Code in libbar uses libfoo but although the binary is created linking with '-lbar -lfoo' the function is not found by the dynamic loader and instead we get an error message:
libtool: link: g++ -g -O2 -o .libs/baz baz.o -Wl,-bind_at_load \ ../bar/.libs/libbar.dylib ../foo/libfoo.a dyld: lazy symbol binding failed: Symbol not found: _foo_version Referenced from: /Users/jari/projects/yat/bar/.libs/libbar.0.dylib Expected in: flat namespace dyld: Symbol not found: _foo_version Referenced from: /Users/jari/projects/yat/bar/.libs/libbar.0.dylib Expected in: flat namespace ./link_test.sh: line 147: 80434 Trace/BPT trap: 5 ./bazHas anyone seen anything like this? Is this a bug in the apple linker or are we using libtool incorrectly? I found this old thread from Peter O'Gorman
http://lists.gnu.org/archive/html/libtool-patches/2007-02/msg00063.htmlbut not sure how to translate it into a solution. I'm aware this is unlikely a libtool issue and apologize if anyone would consider this noise.
Any hint or suggestion for further investigation would be most appreciated. Thanks, -- Peter Johansson
link_test.sh
Description: Bourne shell script
_______________________________________________ https://lists.gnu.org/mailman/listinfo/libtool