Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

OpenCV on Mac OS X 10.8 Mountain Lion

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:

/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:

inline void print_params(const IndexParams& params)
{
    IndexParams::const_iterator it;

    for(it=params.begin(); it!=params.end(); ++it) {
        std::cout << it->first << " : " << it->second << std::endl;
    }
}

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!