I'm kind of puzzled as I cannot use imshow
from the opencv library. I use plenty of other function from opencv, but I get this error, when I want to show my 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)
The the codelines/functions throwing this error are:
cvStartWindowThread();
namedWindow("DisplayImage", WINDOW_AUTOSIZE);
imshow("Display Image", img_bgr);
where img_bgr
is my desired matrix.
I'm working on OSX 10.8.5 with Xcode 5.1.1 and opencv-2.4.10 was installed via this walkthrough.
Anyone has an idea and can help why I can't call those above functions? I searched for threads concerning this problem, but none seemed to be satisfying.
EDIT:
Have uninstalled and installed OpenCV twice now. Once with Cmake itself (as application) and once with help of this tutorial. Nothing worked out still get the same error. Does no one have an idea?