Boost logo

Boost Users :

From: Daniel Lidström (daniel.lidstrom_at_[hidden])
Date: 2005-04-29 05:03:23


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

Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net