[cfe-dev] linking with libc++ - problem finding logl
David.Chisnall at cl.cam.ac.uk
Tue Apr 2 00:12:01 PDT 2013
This would be better addressed to a FreeBSD list, but...
The problem is that FreeBSD's libm currently lacks this function. We have some people working on full C99 compatible math library functions by 10.0. If you don't mind the loss of precision, you can just implement a stub that calls log().
On 1 Apr 2013, at 17:46, Volodymyr Kostyrko <c.kworr at gmail.com> wrote:
> 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_program_options.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_iostreams.so /usr/local/lib/libboost_program_options.so /usr/local/lib/libboost_system.so /usr/local/lib/libboost_thread.so -Wl,-rpath,/usr/local/lib
> 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 invocation)
> I'm just curios what happens and what library I need to include?
> Sphinx of black quartz, judge my vow.
> cfe-dev mailing list
> cfe-dev at cs.uiuc.edu
More information about the cfe-dev