build problems on Mac OS with MacPorts gcc

Hi, I'm on OS X, and I have a gcc 4.5 from macports (because I wanted C++0x features). I downloaded boost and compiled the regex library, but used the default boost build commands so it used apple's gcc, which led to weird bug when linked to a program created with gcc4.5. (Maybe that's not supposed to happen? I can start another thread about that.) Now I'm trying to build boost with the gcc 4.5, but that doesn't work... I followed these instructions to build bjam: http://www.boost.org/doc/libs/1_43_0/doc/html/jam/building.html I also edited a 'user-config.jam' to have: using gcc : 4.5 : g++-mp-4.5 ; Then went to BOOST_ROOT and ran: bjam toolset=gcc stage And it eventually barfs with this: gcc.link.dll bin.v2/libs/regex/build/gcc-4.5/release/threading-multi/libboost_regex.dylib ld: unknown option: -h collect2: ld returned 1 exit status Any ideas? thanks, Rob

Rob Nikander wrote:
Hi,
I'm on OS X, and I have a gcc 4.5 from macports (because I wanted C++0x features). I downloaded boost and compiled the regex library, but used the default boost build commands so it used apple's gcc, which led to weird bug when linked to a program created with gcc4.5. (Maybe that's not supposed to happen? I can start another thread about that.) Now I'm trying to build boost with the gcc 4.5, but that doesn't work...
I followed these instructions to build bjam:
http://www.boost.org/doc/libs/1_43_0/doc/html/jam/building.html
I also edited a 'user-config.jam' to have:
using gcc : 4.5 : g++-mp-4.5 ;
Then went to BOOST_ROOT and ran:
bjam toolset=gcc stage
And it eventually barfs with this:
gcc.link.dll bin.v2/libs/regex/build/gcc-4.5/release/threading-multi/libboost_regex.dylib ld: unknown option: -h collect2: ld returned 1 exit status
Any ideas?
Use 'darwin', not 'gcc', as the toolset. - Volodya
participants (2)
-
Rob Nikander
-
Vladimir Prus