1

There are several similar topics:

How do I compile boost for OS X 64b platforms with stdlibc++?

Linking troubles with boost::program_options on OSX using LLVM

However, my problem still persists.

What I want:

  • I want to compile on Mac OS X
  • I compile my c++ programs with the following defines: -stdlib=libc++ -std=c++11 -m64
  • I want to link against the static (*.a) boost libraries, therefore I am trying to compile boost for 64 bit

My last approach was:

sudo sh bootstrap.sh address.model=64

Followed by

sudo ./b2 toolset=clang cxxflags="-stdlib=libc++ -std=c++11" linkflags="-stdlib=libc++ -std=c++11" link=static install -j2

Everything compiles fine, however when I try to link against the boost-libraries I get several errors related to boost since the linker reports:

ld: symbol(s) not found for architecture x86_64

I tried several configurations, but the problem persists. I appreciate any help

Community
  • 1
  • 1
Anonymous
  • 4,617
  • 9
  • 48
  • 61
  • Which symbols, specifically, are not found? Boost's symbols? Also, why are you building with `sudo`? That's generally discouraged. – Cornstalks Dec 19 '14 at 16:33
  • Also, which version of OS X and Xcode do you have? Recent versions of Xcode don't even have libstdc++, so the `-stdlib=libc++` option is unnecessary. – Cornstalks Dec 19 '14 at 16:40
  • It's been a while, but I thought Boost compiled into universal binaries on OS X, by default? – Collin Dauphinee Dec 19 '14 at 19:03
  • Can you augment your question with a dump of the symbols of some boost library that use stl? Something like `nm libboost_chrono.a | c++filt`. Please also provide more details of the compiler used to build your C++ programs (eg clang / clang++). – blockchaindev Aug 07 '15 at 10:07

0 Answers0