[pkg-boost-devel] Bug#727625: Fails to link using clang-3.4 and libc++

Alex Valavanis valavanisalex at gmail.com
Thu Oct 24 18:03:30 UTC 2013


Package: libboost-program-options1.53-dev
Version: 1.53.0-6+exp3ubuntu8

I've tried compiling a simple test program (attached) using clang-3.4
and libc++.  Link failure as follows:

$ clang++ -stdlib=libc++ test.cpp -lboost_program_options
/tmp/test-KhY5IK.o: In function `main':
test.cpp:(.text+0xbd): undefined reference to
`boost::program_options::options_description::options_description(std::__1::basic_string<char,
std::__1::char_traits<char>, std::__1::allocator<char> > const&,
unsigned int, unsigned int)'
clang: error: linker command failed with exit code 1 (use -v to see invocation)

The same file links just fine if I use libstdc++:

clang++ -stdlib=libstdc++ test.cpp -lboost_program_options

I have attached a verbose build log obtained used

clang++ -stdlib=libc++ test.cpp -lboost_program_options -v

Thanks,


Alex
-------------- next part --------------
A non-text attachment was scrubbed...
Name: test.cpp
Type: text/x-c++src
Size: 173 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/pkg-boost-devel/attachments/20131024/7689f874/attachment.cpp>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: build.log
Type: text/x-log
Size: 2730 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/pkg-boost-devel/attachments/20131024/7689f874/attachment.bin>


More information about the pkg-boost-devel mailing list