Boost internal link problem
Hello, Trying to link to the Boost libraries for openvrml resulted in the following error: /bin/sh ../libtool --tag=CXX --mode=link g++ -D_THREAD_SAFE -g - O2 -lboost_system-xgcc40-mt-1_37.dylib -o browser browser.o libtest- openvrml.la -lboost_unit_test_framework-xgcc40-mt-1_37 - lboost_filesystem-xgcc40-mt-1_37 g++ -D_THREAD_SAFE -g -O2 -o .libs/browser browser.o -Wl,- bind_at_load -lboost_system-xgcc40-mt-1_37.dylib ./.libs/libtest- openvrml.a -L/usr/local/lib -L/opt/local/lib /Users/frank/ FirefoxDownloads/openvrml-0.17.12/src/libopenvrml/.libs/ libopenvrml.dylib -L/opt/local/lib/firefox-2.0.0.20 /opt/local/lib/ libjpeg.dylib /opt/local/lib/libpng12.dylib /opt/local/lib/ libfontconfig.dylib /opt/local/lib/libiconv.dylib /opt/local/lib/ libexpat.dylib /opt/local/lib/libfreetype.dylib -lz -lmozjs -lplds4 - lplc4 -lnspr4 -lboost_thread-xgcc40-mt-1_37 - lboost_unit_test_framework-xgcc40-mt-1_37 -lboost_filesystem-xgcc40- mt-1_37 /usr/bin/ld: can't locate file for: -lboost_system-xgcc40-mt-1_37.dylib collect2: ld returned 1 exit status make[2]: *** [browser] Error 1 make[2]: Leaving directory `/Users/frank/FirefoxDownloads/ openvrml-0.17.12/tests' make[1]: *** [check-am] Error 2 make[1]: Leaving directory `/Users/frank/FirefoxDownloads/ openvrml-0.17.12/tests' make: *** [check-recursive] Error 1 The command sequence that led to the error was: ./configure BOOST_LIB_SUFFIX="-xgcc40-mt-1_37" LDFLAGS="-L/usr/local/ lib -L/opt/local/lib" CPPFLAGS=-I"/usr/local/spidermonkey/include/ -I/ Users/frank/FirefoxDownloads/xulrunner-sdk/sdk/include/ -DXP_UNIX" PKG_CONFIG_PATH="/opt/local/lib/pkgconfig/:/usr/local/lib/pkgconfig:/ sw/lib/pkgconfig" --with-libjs make make check A work around to the error was: make check LDFLAGS='-lboost_system-xgcc40-mt-1_37' The question is why the additional -l was needed to link two Boost libraries in order to overcome a dependency between the two Boost libraries. Frank J. R. Hanstick trog24@comcast.net
AMDG Frank J. R. Hanstick wrote:
/bin/sh ../libtool --tag=CXX --mode=link g++ -D_THREAD_SAFE -g -O2 -lboost_system-xgcc40-mt-1_37.dylib -o browser browser.o libtest-openvrml.la -lboost_unit_test_framework-xgcc40-mt-1_37 -lboost_filesystem-xgcc40-mt-1_37 /usr/bin/ld: can't locate file for: -lboost_system-xgcc40-mt-1_37.dylib
Shouldn't this be -lboost_system-xgcc40-mt-1_37 (no .dylib) Also, why is it in a different place from the other libs? In Christ, Steven Watanabe
participants (2)
-
Frank J. R. Hanstick
-
Steven Watanabe