Opened 16 years ago

Closed 16 years ago

#726 closed Support Requests (Fixed)

"-shared" not supported for linking under MacOS X

Reported by: jonamike Owned by: nobody
Milestone: Component: Building Boost
Version: None Severity:
Keywords: Cc:

Description

When I try to do a plain-vanilla build of Boost using
bjam (following the directions at
http://www.boost.org/more/getting_started.html pretty
carefully) I get the following results for one of the
targets (I note that "man gcc" says that "-shared is
not supported under Mac OS X" -- do I need to configure
Boost specially for Mac OS X?):


gcc-Link-action
bin/boost/libs/date_time/build/libboost_date_time.dylib/gcc/debug/shared-linkable-true/libboost_date_time-gcc-d-1_33_1.dylib
powerpc-apple-darwin8-g++-4.0.1: unrecognized option
'-shared'
/usr/bin/ld: Undefined symbols:
_main
collect2: ld returned 1 exit status

    set -e
   
DYLD_LIBRARY_PATH=bin/boost/libs/date_time/build/libboost_date_time.dylib/gcc/debug/shared-linkable-true:$DYLD_LIBRARY_PATH
    export DYLD_LIBRARY_PATH
    "c++"    -g -fPIC -shared -o
"bin/boost/libs/date_time/build/libboost_date_time.dylib/gcc/debug/shared-linkable-true/libboost_date_time-gcc-d-1_33_1.dylib"
 
"bin/boost/libs/date_time/build/libboost_date_time.dylib/gcc/debug/shared-linkable-true/greg_month.o"
"bin/boost/libs/date_time/build/libboost_date_time.dylib/gcc/debug/shared-linkable-true/greg_weekday.o"
"bin/boost/libs/date_time/build/libboost_date_time.dylib/gcc/debug/shared-linkable-true/date_generators.o"
     
    

...failed gcc-Link-action
bin/boost/libs/date_time/build/libboost_date_time.dylib/gcc/debug/shared-linkable-true/libboost_date_time-gcc-d-1_33_1.dylib...


TIA,
Jonathan

Change History (1)

comment:1 by david_abrahams, 16 years ago

Status: assignedclosed
Logged In: YES 
user_id=52572
Originator: NO

You need to use the "darwin" toolset instead of the "gcc" toolset.
Note: See TracTickets for help on using tickets.