我已经OpenCV2
在XCode中进行了设置,但不幸的imshow
是无法正常工作:
Undefined symbols for architecture x86_64:
"cv::imshow(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, cv::_InputArray const&)", referenced from:
_main in main.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
我正在使用最新的XCode运行OS X 10.8.4。
我在下面附加了一些图像,以显示XCode和库中的设置。到目前为止,除此以外,其他功能似乎都可以与OpenCV正常工作。
我要去无路可退,说你编OpenCV2
带libstdc++
,并正在编制与应用程序libc++
的支持。
您需要使用相同的C++
库编译OpenCV2 ,否则它将无法链接。
如果您使用nm
的是OpenCV2库,则使用编译时libstdc++
,它将看起来像:
cv::imshow(std::string const&, cv::_InputArray const&)
而如果使用编译libc++
,它将看起来像:
cv::imshow(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, cv::_InputArray const&)
要获得去污符号,请执行以下操作:
nm library | c++filt | grep cv::imshow
本文收集自互联网,转载请注明来源。
如有侵权,请联系 [email protected] 删除。
我来说两句