Search code examples
c++c++11g++clang++abi

errors linking clang-built executable with g++-v6-built boost library


I have a boost regex library built myself with g++ version 6.3.1 on Fedora Linux.

Then I have my own library using the boost regex, built with clang++ 4.0 as shared object. Building this works fine.

At last I have an executable which links to my library and this produces the following error:

undefined reference to `boost::re_detail::cpp_regex_traits_implementation<char>::transform[abi:cxx11](char const*, char const*) const'

Building and linking with g++ only works correctly.

Can this be solved with some commandline argument to clang++?


Solution

  • As nobody seems to have a solution for this, I compiled boost a second time with ./b2 toolset=clang and now my problems are gone.