无法在 OSX 10.8 上的 xcode 5 中使用 imshow
Can't use imshow in xcode 5 on OSX 10.8
我有点困惑,因为我无法使用 opencv 库中的 imshow
。我使用了 opencv 中的许多其他函数,但是当我想显示 matrix/image.
时出现此错误
Undefined symbols for architecture x86_64:
"cv::namedWindow(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, int)", referenced from:
_main in main.o
"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)
抛出这个错误的codelines/functions是:
cvStartWindowThread();
namedWindow("DisplayImage", WINDOW_AUTOSIZE);
imshow("Display Image", img_bgr);
其中 img_bgr
是我想要的矩阵。
我正在使用 Xcode 5.1.1 开发 OSX 10.8.5,opencv-2.4.10 是通过 this walkthrough.
安装的
任何人都有想法并且可以帮助我为什么不能调用上面的那些函数?我搜索了有关此问题的线程,但 none 似乎令人满意。
编辑:
已经卸载和安装了两次OpenCV。一次使用 Cmake 本身(作为应用程序),一次使用 this tutorial。没有任何解决方案仍然会出现相同的错误。
没人知道吗?
经过几次 trials/hours 的故障排除,我终于搞定了 运行。这是一种压路机战术,但无论如何。我刚刚格式化了笔记本电脑并在新分区上安装了 10.10 Yosemite。
经过一些 with OpenCV, which are initially explained here and solved here 它现在运行完美。
我有点困惑,因为我无法使用 opencv 库中的 imshow
。我使用了 opencv 中的许多其他函数,但是当我想显示 matrix/image.
Undefined symbols for architecture x86_64:
"cv::namedWindow(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, int)", referenced from:
_main in main.o
"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)
抛出这个错误的codelines/functions是:
cvStartWindowThread();
namedWindow("DisplayImage", WINDOW_AUTOSIZE);
imshow("Display Image", img_bgr);
其中 img_bgr
是我想要的矩阵。
我正在使用 Xcode 5.1.1 开发 OSX 10.8.5,opencv-2.4.10 是通过 this walkthrough.
安装的任何人都有想法并且可以帮助我为什么不能调用上面的那些函数?我搜索了有关此问题的线程,但 none 似乎令人满意。
编辑:
已经卸载和安装了两次OpenCV。一次使用 Cmake 本身(作为应用程序),一次使用 this tutorial。没有任何解决方案仍然会出现相同的错误。 没人知道吗?
经过几次 trials/hours 的故障排除,我终于搞定了 运行。这是一种压路机战术,但无论如何。我刚刚格式化了笔记本电脑并在新分区上安装了 10.10 Yosemite。
经过一些