How to build boost on Darwin/MacOSX
Hello. I'm new to Boost, and am trying to build the boost_thread library on Darwin (Mac OSX 10.2.4). I have tried 1.30.0 and the CVS version, but get a bunch of linker errors (copied below), as well as a warning about Python (which I assume is safe to ignore if I don't want Python stuff). What is the correct way to build boost on Darwin/OSX? I have tried the following: bjam boost_thread bjam -sTOOLS=gcc boost_thread bjam -sBUILD="framework bundle-loader" boost_thread bjam bjam -sTOOLS=gcc ... And I tried hacking tools/build/gcc-tools.jam to add "-lstdc++" to the linker command line. All have the same problem. here is my GCC version: $ gcc --version 2.95.2 (3.2, which is also available for OSX, and I think might be the defauld, has bugs [so does 2.95 though...], so I can't use it for my own c++ code) Here is the bjam output (I used "bjam -q boost_thread" on the CVS checkout): [...Python warning...] ...found 322 targets... ...updating 6 targets... gcc-Link-action libs/thread/build/bin/libboost_thread.dylib/gcc/debug/runtime-link- dynamic/shared-linkable-true/libboost_thread.dylib /usr/bin/ld: Undefined symbols: _main __._9exception ___builtin_delete ___cp_push_exception ___eh_alloc ___eprintf ___rtti_si ___throw ___vt_9exception _terminate__Fv ___builtin_new ___cp_pop_exception ___nw__FUlPv ___start_cp_handler ___tf9exception ___ti9exception export DYLD_LIBRARY_PATH c++ -g -fPIC -shared -o "libs/thread/build/bin/libboost_thread.dylib/gcc/debug/runtime-link- dynamic/shared-linkable-true/libboost_thread.dylib" "libs/thread/build/bin/libboost_thread.dylib/gcc/debug/runtime-link- dynamic/shared-linkable-true/condition.o" "libs/thread/build/bin/libboost_thread.dylib/gcc/debug/runtime-link- dynamic/shared-linkable-true/mutex.o" "libs/thread/build/bin/libboost_thread.dylib/gcc/debug/runtime-link- dynamic/shared-linkable-true/recursive_mutex.o" "libs/thread/build/bin/libboost_thread.dylib/gcc/debug/runtime-link- dynamic/shared-linkable-true/thread.o" "libs/thread/build/bin/libboost_thread.dylib/gcc/debug/runtime-link- dynamic/shared-linkable-true/tss.o" "libs/thread/build/bin/libboost_thread.dylib/gcc/debug/runtime-link- dynamic/shared-linkable-true/xtime.o" "libs/thread/build/bin/libboost_thread.dylib/gcc/debug/runtime-link- dynamic/shared-linkable-true/once.o" "libs/thread/build/bin/libboost_thread.dylib/gcc/debug/runtime-link- dynamic/shared-linkable-true/exceptions.o" "libs/thread/build/bin/libboost_thread.dylib/gcc/debug/runtime-link- dynamic/shared-linkable-true/threadmon.o" ...failed gcc-Link-action libs/thread/build/bin/libboost_thread.dylib/gcc/debug/runtime-link- dynamic/shared-linkable-true/libboost_thread.dylib... ...failed updating 1 target... Thanks for any info anyone can give. reed -- Reed Hedges VOS/Interreality Project reed@interreality.org http://interreality.org
participants (1)
-
Reed Hedges