[cfe-dev] linking with libc++ - problem finding logl

Volodymyr Kostyrko c.kworr at gmail.com
Mon Apr 1 09:46:56 PDT 2013

Hi all.

I'm trying to test some piece of code with libc++. I selected libc++ as 
base library here (FreeBSD) has no support for logl and it's needed for 
some methematical operations.

I'm building everything with clang 3.2 '-std=c++11 -stdlib=libc++', some 
files are buundled into static libraries.

When I try to link those libraries into main executable I have this:

/usr/local/libexec/ccache/c++ -O2 -pipe -stdlib=libc++ some.cpp.o 
another.cpp.o -o build/Result /usr/local/lib/libboost_iostreams.so 
/usr/local/lib/libboost_system.so /usr/local/lib/libboost_thread.so 
build/some.a build/another.a -lc++ -lcxxrt -lm 
/usr/local/lib/libboost_system.so /usr/local/lib/libboost_thread.so 
build/some.a(onemore.cpp.o): In function `Models::old_vega(double, 
double, double, double, double)':
/home/arcade/work/onemore.cpp:(.text+0x7cb): undefined reference to `logl'
c++: error: linker command failed with exit code 1 (use -v to see 

I'm just curios what happens and what library I need to include?

Sphinx of black quartz, judge my vow.

More information about the cfe-dev mailing list