[Mac OS X] Problem compiling boost
Hello, I get linking errrors while trying to compile the program_options. Here is the output: Daniels-Monster:/Users/daniellidstrom/Desktop/boost_1_32_0> bjam --with-program_options stage ...found 468 targets... ...updating 4 targets... gcc-Link-action bin/boost/libs/program_options/build/libboost_program_options.dylib/ gcc/debug/shared-linkable-true/libboost_program_options-gcc-d -1_32.dylib g++: unrecognized option `-shared' ld: Undefined symbols: _main set -e DYLD_LIBRARY_PATH=bin/boost/libs/program_options/build/ libboost_program_options.dylib/gcc/debug/shared-linkable- true:$DYLD_LIBRARY_PATH export DYLD_LIBRARY_PATH "g++" -g -fPIC -shared -o "bin/boost/libs/program_options/build/libboost_program_options.dylib/ gcc/debug/shared-linkable-true/libboost_program_options-gcc-d -1_32.dylib" "bin/boost/libs/program_options/build/libboost_program_options.dylib/ gcc/debug/shared-linkable-true/cmdline.o" "bin/boost/libs/program_options/build/libboost_program_options.dylib/ gcc/debug/shared-linkable-true/config_file.o" "bin/boost/libs/program_options/build/libboost_program_options.dylib/ gcc/debug/shared-linkable-true/options_description.o" "bin/boost/libs/program_options/build/libboost_program_options.dylib/ gcc/debug/shared-linkable-true/parsers.o" "bin/boost/libs/program_options/build/libboost_program_options.dylib/ gcc/debug/shared-linkable-true/variables_map.o" "bin/boost/libs/program_options/build/libboost_program_options.dylib/ gcc/debug/shared-linkable-true/value_semantic.o" "bin/boost/libs/program_options/build/libboost_program_options.dylib/ gcc/debug/shared-linkable-true/positional_options.o" "bin/boost/libs/program_options/build/libboost_program_options.dylib/ gcc/debug/shared-linkable-true/utf8_codecvt_facet.o" "bin/boost/libs/program_options/build/libboost_program_options.dylib/ gcc/debug/shared-linkable-true/convert.o" "bin/boost/libs/program_options/build/libboost_program_options.dylib/ gcc/debug/shared-linkable-true/winmain.o" ...failed gcc-Link-action bin/boost/libs/program_options/build/libboost_program_options.dylib/ gcc/debug/shared-linkable-true/libboost_program_options-gcc-d -1_32.dylib... ...skipped <@boost!lib>libboost_program_options-gcc-d-1_32.dylib for lack of <@boost!libs!program_options!build/libboost_program_options.dylib/gcc/ debug/shared-linkable-true>libboost_program_options-gcc-d-1_32.dylib... I'm using gcc 3.2 (the one that came with XCode 1.5). Strange thing is the man page says -static is an option for both gcc and g++. How can I successfully compile the dynamic-link library? The static-link library was compiled successfully though. Also, I added -Wno-long-double to the g++ options, to get rid of an annoying warning. The gcc bjam file says there is no gcc or g++ on Darwin, but there certainly is for me. I'm using Mac OS X 10.3.9 with gcc 3.2 from XCode 1.5 installation. -- Daniel SBG AB
On Apr 29, 2005, at 5:03 AM, Daniel Lidström wrote:
Hello,
I get linking errrors while trying to compile the program_options. Here is the output:
Daniels-Monster:/Users/daniellidstrom/Desktop/boost_1_32_0> bjam --with-program_options stage
You'll probably need to add "-sTOOLS=darwin" to your bjam command line. In Boost 1.32.0, the build system uses the basic "gcc" toolset on Mac OS X by default, but it really needs to the use the "darwin" toolset. Doug
participants (2)
-
Daniel Lidström
-
Douglas Gregor