C++ 是否可以在Mountain Lion上的当前Xcode 4.6.1工具链中启用_LIBCPP_DEBUG2?

C++ 是否可以在Mountain Lion上的当前Xcode 4.6.1工具链中启用_LIBCPP_DEBUG2?,c++,debugging,stl,vmat,C++,Debugging,Stl,Vmat,是关于clang的libc++调试模式的早期讨论,该模式将通过在编译器命令中定义\u LIBCPP\u DEBUG2来启用。刚刚与一个错误分配的std::vector做了斗争,我对能够在调试构建中启用它很感兴趣 当我尝试简单地将\u LIBCPP\u DEBUG=1添加到预处理器宏构建设置时,在链接阶段(如下所示)会出现错误。我怀疑这是由讨论线程中描述的对调试数据库的新生成的引用引起的 在早期的讨论中,有人指出,图书馆的标准版本中提供了必要的支持,但今天的情况似乎并非如此。它仍然受到支持吗?如果

是关于clang的libc++调试模式的早期讨论,该模式将通过在编译器命令中定义
\u LIBCPP\u DEBUG2
来启用。刚刚与一个错误分配的
std::vector
做了斗争,我对能够在调试构建中启用它很感兴趣

当我尝试简单地将
\u LIBCPP\u DEBUG=1
添加到预处理器宏构建设置时,在链接阶段(如下所示)会出现错误。我怀疑这是由讨论线程中描述的对调试数据库的新生成的引用引起的

在早期的讨论中,有人指出,图书馆的标准版本中提供了必要的支持,但今天的情况似乎并非如此。它仍然受到支持吗?如果是,我如何链接到必要的位

Ld /Users/kaelin/Library/Developer/Xcode/DerivedData/OMWorkspace-bzkzcamyqoztgyalubrmemkzmjvk/Build/Products/Debug/vMAT.dylib normal x86_64
    cd /Users/Shared/Source/vMAT
    setenv MACOSX_DEPLOYMENT_TARGET 10.8
    /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++ -arch x86_64 -dynamiclib -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk -L/Users/kaelin/Library/Developer/Xcode/DerivedData/OMWorkspace-bzkzcamyqoztgyalubrmemkzmjvk/Build/Products/Debug -F/Users/kaelin/Library/Developer/Xcode/DerivedData/OMWorkspace-bzkzcamyqoztgyalubrmemkzmjvk/Build/Products/Debug -F/Users/Shared/Source/vMAT/../../../kaelin/Library/Developer/Xcode/DerivedData/OMWorkspace-bzkzcamyqoztgyalubrmemkzmjvk/Build/Products/Debug -filelist /Users/kaelin/Library/Developer/Xcode/DerivedData/OMWorkspace-bzkzcamyqoztgyalubrmemkzmjvk/Build/Intermediates/vMAT.build/Debug/vMAT.build/Objects-normal/x86_64/vMAT.LinkFileList -install_name "@rpath/vMAT.dylib" -mmacosx-version-min=10.8 -fobjc-arc -fobjc-link-runtime -stdlib=libc++ -framework BlocksKit -framework Accelerate -framework Cocoa -single_module -compatibility_version 1 -current_version 1 -o /Users/kaelin/Library/Developer/Xcode/DerivedData/OMWorkspace-bzkzcamyqoztgyalubrmemkzmjvk/Build/Products/Debug/vMAT.dylib

Undefined symbols for architecture x86_64:
  "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
  "std::__1::__libcpp_db::__insert_c(void*)", referenced from:
      std::__1::vector<float, std::__1::allocator<float> >::vector<float*>(float*, float*, std::__1::enable_if<__is_forward_iterator<float*>::value, void>::type*) in vMAT_Array+UnaryOps.o
      std::__1::vector<double, std::__1::allocator<double> >::vector<double*>(double*, double*, std::__1::enable_if<__is_forward_iterator<double*>::value, void>::type*) in vMAT_Array+UnaryOps.o
      std::__1::vector<float, std::__1::allocator<float> >::vector<float*>(float*, float*, std::__1::enable_if<__is_forward_iterator<float*>::value, void>::type*) in vMAT_Array+BinaryOps.o
      std::__1::vector<double, std::__1::allocator<double> >::vector<double*>(double*, double*, std::__1::enable_if<__is_forward_iterator<double*>::value, void>::type*) in vMAT_Array+BinaryOps.o
      std::__1::vector<int, std::__1::allocator<int> >::vector(unsigned long, int const&) in vMAT_inconsistent.o
      std::__1::vector<int, std::__1::allocator<int> >::vector(std::__1::vector<int, std::__1::allocator<int> > const&) in vMAT_inconsistent.o
      (anonymous namespace)::clusterOptions(NSArray*) in vMAT_cluster.o
      ...
  "std::__1::__libcpp_db::__insert_ic(void*, void 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::__erase_c(void*)", 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
      (anonymous namespace)::traceTree(vMAT::Matrix<double>, double*, int, unsigned int) in vMAT_inconsistent.o
      ___Block_byref_object_dispose_ in vMAT_inconsistent.o
      (anonymous namespace)::Options::~Options() in vMAT_cluster.o
      ...
  "std::__1::__libcpp_db::__erase_i(void*)", 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::__get_const_db()", 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::__c_node::~__c_node()", referenced from:
      std::__1::_C_node<std::__1::vector<float, std::__1::allocator<float> > >::~_C_node() in vMAT_Array+UnaryOps.o
      std::__1::_C_node<std::__1::vector<double, std::__1::allocator<double> > >::~_C_node() in vMAT_Array+UnaryOps.o
      std::__1::_C_node<std::__1::vector<float, std::__1::allocator<float> > >::~_C_node() in vMAT_Array+BinaryOps.o
      std::__1::_C_node<std::__1::vector<double, std::__1::allocator<double> > >::~_C_node() in vMAT_Array+BinaryOps.o
      std::__1::_C_node<std::__1::vector<int, std::__1::allocator<int> > >::~_C_node() in vMAT_inconsistent.o
      std::__1::_C_node<std::__1::vector<int, std::__1::allocator<int> > >::~_C_node() in vMAT_cluster.o
      std::__1::_C_node<std::__1::vector<double, std::__1::allocator<double> > >::~_C_node() in vMAT_cluster.o
      ...
  "std::__1::__get_db()", 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
      std::__1::vector<float, std::__1::allocator<float> >::vector<float*>(float*, float*, std::__1::enable_if<__is_forward_iterator<float*>::value, void>::type*) in vMAT_Array+UnaryOps.o
      std::__1::vector<double, std::__1::allocator<double> >::vector<double*>(double*, double*, std::__1::enable_if<__is_forward_iterator<double*>::value, void>::type*) 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::vector<float, std::__1::allocator<float> >::vector<float*>(float*, float*, std::__1::enable_if<__is_forward_iterator<float*>::value, void>::type*) in vMAT_Array+BinaryOps.o
      ...
  "typeinfo for std::__1::__c_node", referenced from:
      typeinfo for std::__1::_C_node<std::__1::vector<float, std::__1::allocator<float> > > in vMAT_Array+UnaryOps.o
      typeinfo for std::__1::_C_node<std::__1::vector<double, std::__1::allocator<double> > > in vMAT_Array+UnaryOps.o
      typeinfo for std::__1::_C_node<std::__1::vector<float, std::__1::allocator<float> > > in vMAT_Array+BinaryOps.o
      typeinfo for std::__1::_C_node<std::__1::vector<double, std::__1::allocator<double> > > in vMAT_Array+BinaryOps.o
      typeinfo for std::__1::_C_node<std::__1::vector<int, std::__1::allocator<int> > > in vMAT_inconsistent.o
      typeinfo for std::__1::_C_node<std::__1::vector<int, std::__1::allocator<int> > > in vMAT_cluster.o
      typeinfo for std::__1::_C_node<std::__1::vector<double, std::__1::allocator<double> > > in vMAT_cluster.o
      ...
  "vtable for std::__1::__c_node", referenced from:
      std::__1::_C_node<std::__1::vector<float, std::__1::allocator<float> > >::_C_node(void*, std::__1::__c_node*) in vMAT_Array+UnaryOps.o
      std::__1::_C_node<std::__1::vector<double, std::__1::allocator<double> > >::_C_node(void*, std::__1::__c_node*) in vMAT_Array+UnaryOps.o
      std::__1::_C_node<std::__1::vector<float, std::__1::allocator<float> > >::_C_node(void*, std::__1::__c_node*) in vMAT_Array+BinaryOps.o
      std::__1::_C_node<std::__1::vector<double, std::__1::allocator<double> > >::_C_node(void*, std::__1::__c_node*) in vMAT_Array+BinaryOps.o
      std::__1::_C_node<std::__1::vector<int, std::__1::allocator<int> > >::_C_node(void*, std::__1::__c_node*) in vMAT_inconsistent.o
      std::__1::_C_node<std::__1::vector<int, std::__1::allocator<int> > >::_C_node(void*, std::__1::__c_node*) in vMAT_cluster.o
      std::__1::_C_node<std::__1::vector<double, std::__1::allocator<double> > >::_C_node(void*, std::__1::__c_node*) in vMAT_cluster.o
      ...
  NOTE: a missing vtable usually means the first non-inline virtual member function has no definition.
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Ld/Users/kaelin/Library/Developer/Xcode/DerivedData/OMWorkspace bzckamyqoztgyalubrmekzmjvk/Build/Products/Debug/vMAT.dylib normal x8664
cd/Users/Shared/Source/vMAT
setenv MACOSX_部署_目标10.8
/Applications/Xcode.app/Contents/Developer/Toolchains/xcodefault.xtoolchain/usr/bin/clang++-arch x86_64-dynamiclib-isysroot/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk-L/Users/kaelin/Library/Developer/Xcode/DerivedData/OMWorkspace-bzcamyqozgzgyalubramezmjvk/Build-F/Users/kaelin/Library/Developer/Xcode/DerivedData/OMWorkspace bzcamyqozgyalubrmekzmjvk/Build/Products/Debug-F/Users/Shared/Source/vMAT/../../kaelin/Library/Developer/Xcode/DerivedData/OMWorkspace bzcamyqozgyalubrmekjvk/Build/Products/Debug-filelist/Users/kaelin/Library/Developer/Xcode/DerivedData/OMWorkspace bzkcmyqoztgyalubrmemkzmjvk/Build/mediates/vMAT.Build/Debug/vMAT.Build/Objects-normal/x86_64/vMAT.LinkFileList-安装名称“@rpath/vMAT.dylib”-mmacosx版本min=10.8-fobjc-arc-fobjc-link-runtime-stdlib=libc++-framework BlocksKit-framework-Accelerate-framework-Cocoa-single_module-compatibility_version 1-current_version 1-o/Users/kaelin/Library/Developer/Xcode/DerivedData/OMWorkspace-bzcamyqozgyalubramekzmjvk/Build/Products/Debug/vMAT.dylib
架构x86_64的未定义符号:
“标准::uu 1::u libcpp_db::u可比(无效常数*,无效常数*)常数”,引用自:
NSString*(匿名名称空间)::vMAT_数组+UnaryOps.o中的dump(NSString*,double*,int vector[4])
NSString*(匿名名称空间)::vMAT_数组+UnaryOps.o中的dump(NSString*,float*,int vector[4])
有符号字符(匿名名称空间)::vMAT_数组+BinaryOps.o中的isEqualEpsilon(double*,int vector[4],double*,int vector[4],double)
有符号字符(匿名名称空间)::vMAT_数组+BinaryOps.o中的isEqualEpsilon(float*,int vector[4],float*,int vector[4],double)
“标准::uu 1::u libcpp_db::u可撤销引用(无效常量*)常量”,引用自:
NSString*(匿名名称空间)::vMAT_数组+UnaryOps.o中的dump(NSString*,double*,int vector[4])
NSString*(匿名名称空间)::vMAT_数组+UnaryOps.o中的dump(NSString*,float*,int vector[4])
有符号字符(匿名名称空间)::vMAT_数组+BinaryOps.o中的isEqualEpsilon(double*,int vector[4],double*,int vector[4],double)
有符号字符(匿名名称空间)::vMAT_数组+BinaryOps.o中的isEqualEpsilon(float*,int vector[4],float*,int vector[4],double)
“std::_1::_libcpp_db::_insert_c(void*)”,引用自:
vMAT_数组+UnaryOps.o中的std::_1::vector::vector(float*,float*,std::_1::enable_if::type*)
vMAT_数组+UnaryOps.o中的std::_1::vector::vector(double*,double*,std::_1::enable_if::type*)
vMAT_数组+BinaryOps.o中的std::_1::vector::vector(float*,float*,std::_1::enable_if::type*)
vMAT_数组+BinaryOps.o中的std::_1::vector::vector(double*,double*,std::_1::enable_if::type*)
vMAT_.o中的std::_1::vector::vector(无符号长,int常量&)
vMAT_.o中的std::_1::vector::vector(std::_1::vector const&)
(匿名命名空间)::vMAT_cluster.o中的clusterOptions(NSArray*)
...
“标准::uuu 1::uu libcpp_db::uu插入ic(void*,void const*)”,引用自:
NSString*(匿名名称空间)::vMAT_数组+UnaryOps.o中的dump(NSString*,double*,int vector[4])
NSString*(匿名名称空间)::vMAT_数组+UnaryOps.o中的dump(NSString*,float*,int vector[4])
有符号字符(匿名名称空间)::vMAT_数组+BinaryOps.o中的isEqualEpsilon(double*,int vector[4],double*,int vector[4],double)
有符号字符(匿名名称空间)::vMAT_数组+BinaryOps.o中的isEqualEpsilon(float*,int vector[4],float*,int vector[4],double)
“std::uuu 1::uuu libcpp_db::uu erase_c(void*)”,引用自:
NSString*(匿名名称空间)::vMAT_数组+UnaryOps.o中的dump(NSString*,double*,int vector[4])
NSString*(匿名名称空间)::vMAT_数组+UnaryOps.o中的dump(NSString*,float*,int vector[4])
有符号字符(匿名名称空间)::vMAT_数组+BinaryOps.o中的isEqualEpsilon(double*,int vector[4],double*,int vector[4],double)
有符号字符(匿名名称空间)::vMAT_数组+BinaryOps.o中的isEqualEpsilon(float*,int vector[4],float*,int vector[4],double)
(匿名命名空间)::vMAT_.o中的traceTree(vMAT::Matrix,double*,int,unsigned int)
___vMAT_.o中的Block_byref_object_dispose_
(匿名命名空间)::选项::~Options()在vMAT_cluster.o中
...
“std::uuu 1::uuu libcpp_db::uu erase_i(void*)”,引用自:
NSString*(匿名名称空间)::vMAT_数组+UnaryOps.o中的dump(NSString*,double*,int vector[4])
NSString*(匿名名称空间)::vMAT_数组+UnaryOps.o中的dump(NSString*,float*,int vector[4])
有符号字符(匿名名称空间)::vMAT_数组+BinaryOps.o中的isEqualEpsilon(double*,int vector[4],double*,int vector[4],double)
签名字符(匿名名称空间):isEqualEpsilon(float*,int vector[4],floa
-D_LIBCPP_DEBUG=0