写了一学期py-opencv了都快结束了突然又要折腾起c++下来,真实给自己跪了,不过环境基本都搞定了,中间碰到了一些问题这里总结一下:
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15 |
"cv::namedWindow(std::__1::basic_string, std::__1::allocator > const&, int)", referenced from: _main in main.o "cv::imread(std::__1::basic_string, std::__1::allocator > const&, int)", referenced from: _main in main.o "cv::imshow(std::__1::basic_string, std::__1::allocator > const&, cv::_InputArray const&)", referenced from: _main in main.old: symbol(s) not found for
architecture x86_64clang: error: linker command failed with exit
code 1 (use -v to see invocation) |
C++库和opencv库编译不一致,将XCode的C++ Standard Library改为GNU C++ standard library即可正常编译显示图片。Project Build settings -> APPLE LLVM compiler 4.2 - Language -> C++ Standard Library
原文:http://www.cnblogs.com/sparkmorry/p/3527624.html