I have used OpenCV with Qt Creator on Windows, but now wanted to use it on Mac OS X too. So I installed 2.4.2, used CMake to make and build (install) the whole, which went without any problems.But, when I add #include <cv.hpp> to one of my files, I get the following error 5 times:
How to install OpenCV 3 on Mac. I’m planning on starting a project involving computer vision using the OpenCV framework. As I’ve had some troubles getting everything installed and running a basic project, I’m writing this tutorial to help anyone who’s going through the same process, hoping it will make it easier:). OpenCV with Xcode. Now that we have installed OpenCV, we are ready to use it in our C/C code. Xcode is the most popular IDE on Mac OS X, so we would naturally want to see how to use OpenCV on Xcode. I have outlined the procedure below: Open Xcode; Select Xcode - New - Project. A new window will pop up.
/usr/local/include/opencv2/flann/params.h:87: error: explicit instantiation of 'std::basic_ostream<_CharT, _Traits>& std::operator<<(std::basic_ostream<_CharT, _Traits>&, const std::basic_string<_CharT, _Traits, _Alloc>&) [with _CharT = char, _Traits = std::char_traits<char>, _Alloc = std::allocator<char>]' but no definition available
The code around the error is this:
![Mac Mac](/uploads/1/2/6/0/126078580/892926878.png)
with the error occurring in the line with std::cout << it->first ...
I can't figure out why this is happening. Any help is greatly appreciated!
editretagflag offensiveclosemergedelete
Comments
Install Opencv Mac Os
I don't know what IndexParams means, but try to take it->first in a separate line and return it's value and try to print it's fields firstly then if every thing is ok, So 'cout << it->first' is illegal.
Opencv Framework For Macos
Well, this is code from OpenCV itself, which worked in Mac OS X 10.7. It works as it is on Windows too, so I don't think there's really anything wrong with it. Also, the error complains about the explicit instantiation of std::basic_ostream(etc.), which would be cout I guess. The file has an #include <iostream>, so it should be able to use std::cout.