[cfe-dev] linker errors on Mac building with _LIBCPP_DEBUG2==1
Jean-Daniel Dupas
devlists at shadowlab.org
Thu Aug 29 12:52:55 PDT 2013
Le 29 août 2013 à 20:51, Eric Hill <Eric.Hill at jmp.com> a écrit :
> Hey,
>
> Not entirely sure this is the right place to ask this question, but it’s all I’ve found, and there is a page here about debug support.
>
> I’m using XCode 4.6.3 on Mac. When I build my C++ project with _LIBCPP_DEBUG2 set to 1, I get linker errors like these:
>
> "std::__1::__libcpp_db::__comparable(void const*, void const*) const", referenced from:
> NSString* (anonymous namespace)::dump<double>(NSString*, double*, int vector[4]) in vMAT_Array+UnaryOps.o
> NSString* (anonymous namespace)::dump<float>(NSString*, float*, int vector[4]) in vMAT_Array+UnaryOps.o
> signed char (anonymous namespace)::isEqualEpsilon<double>(double*, int vector[4], double*, int vector[4], double) in vMAT_Array+BinaryOps.o
> signed char (anonymous namespace)::isEqualEpsilon<float>(float*, int vector[4], float*, int vector[4], double) in vMAT_Array+BinaryOps.o
> "std::__1::__libcpp_db::__dereferenceable(void const*) const", referenced from:
> NSString* (anonymous namespace)::dump<double>(NSString*, double*, int vector[4]) in vMAT_Array+UnaryOps.o
> NSString* (anonymous namespace)::dump<float>(NSString*, float*, int vector[4]) in vMAT_Array+UnaryOps.o
> signed char (anonymous namespace)::isEqualEpsilon<double>(double*, int vector[4], double*, int vector[4], double) in vMAT_Array+BinaryOps.o
> signed char (anonymous namespace)::isEqualEpsilon<float>(float*, int vector[4], float*, int vector[4], double) in vMAT_Array+BinaryOps.o
>
> Seems like I need to link in a different lib or something, but darned if I can figure out what. Any ideas?
>
> This question was asked on StackOverflow (by someone else) in April and has gone unanswered.
>
> Thanks,
>
The fact that you are using _LIBCPP_DEBUG2 and not _LIBCPP_DEBUG which is the current debug macro name in libc++ TOT version make me think you are using an old libc++ version.
And AFAIK, libc++ debug mode is experimental, and until recently, it was rather broken. Unless you are using a very recent svn version, there is few chance you managed to make it works.
-- Jean-Daniel
More information about the cfe-dev
mailing list