linker errors on Mac building with _LIBCPP_DEBUG2==1

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(NSString*, double*, int vector[4]) in vMAT_Array+UnaryOps.o
NSString* (anonymous namespace)::dump(NSString*, float*, int vector[4]) in vMAT_Array+UnaryOps.o
signed char (anonymous namespace)::isEqualEpsilon(double*, int vector[4], double*, int vector[4], double) in vMAT_Array+BinaryOps.o
signed char (anonymous namespace)::isEqualEpsilon(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(NSString*, double*, int vector[4]) in vMAT_Array+UnaryOps.o
NSString* (anonymous namespace)::dump(NSString*, float*, int vector[4]) in vMAT_Array+UnaryOps.o
signed char (anonymous namespace)::isEqualEpsilon(double*, int vector[4], double*, int vector[4], double) in vMAT_Array+BinaryOps.o
signed char (anonymous namespace)::isEqualEpsilon(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,

Eric

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