Ask Your Question

Revision history [back]

OpenCV and Cygwin - can't compile tutorials

I followed this guide to (try) install OpenCV on my cygwin since that's the only environment I've worked with and there wasn't anyone like it on the OpenCV homepage.

I'm not sure if that's a valid install because when I try to compile some of the core tutorials like mat_the_basic_image_container I get this error:

Ejvind E. Lauritsen@EjvindELauritse/cygdrive/c/opencv/samples/cpp/
tutorial_code/core/mat_the_basic_image_container
$ gcc mat_the_basic_image_container.cpp
mat_the_basic_image_container.cpp: In function ‘int main(int, char**)’:
mat_the_basic_image_container.cpp:62:51: error: ‘FMT_PYTHON’ is not a member of ‘cv::Formatter’
mat_the_basic_image_container.cpp:63:51: error: ‘FMT_NUMPY’ is not a member of ‘cv::Formatter’
mat_the_basic_image_container.cpp:64:51: error: ‘FMT_CSV’ is not a member of ‘cv::Formatter’
mat_the_basic_image_container.cpp:65:51: error: ‘FMT_C’ is not a member of ‘cv::Formatter’

Why is OpenCV so hard to install? I just want it to work so I can code in a simple editor and then compile it with cygwin..

I'm so desperate! Heeelp!

OpenCV and Cygwin - can't compile tutorials

I followed this guide to (try) install OpenCV on my cygwin since that's the only environment I've worked with and there wasn't anyone like it on the OpenCV homepage.

I'm not sure if that's a valid install because when I try to compile some of the core tutorials like mat_the_basic_image_container I get this error:

Ejvind E. Lauritsen@EjvindELauritse/cygdrive/c/opencv/samples/cpp/
tutorial_code/core/mat_the_basic_image_container
$ gcc mat_the_basic_image_container.cpp
mat_the_basic_image_container.cpp: In function ‘int main(int, char**)’:
mat_the_basic_image_container.cpp:62:51: error: ‘FMT_PYTHON’ is not a member of ‘cv::Formatter’
mat_the_basic_image_container.cpp:63:51: error: ‘FMT_NUMPY’ is not a member of ‘cv::Formatter’
mat_the_basic_image_container.cpp:64:51: error: ‘FMT_CSV’ is not a member of ‘cv::Formatter’
mat_the_basic_image_container.cpp:65:51: error: ‘FMT_C’ is not a member of ‘cv::Formatter’

Why is OpenCV so hard to install? I just want it to work so I can code in a simple editor and then compile it with cygwin..

I'm so desperate! Heeelp!Heeelp! How does anyone get OpenCV to work, ever?

OpenCV and Cygwin - can't compile tutorials

I followed this guide to (try) install OpenCV on my cygwin since that's the only environment I've worked with and there wasn't anyone like it on the OpenCV homepage.

I'm not sure if that's a valid install because when I try to compile some of the core tutorials like mat_the_basic_image_container I get this error:

Ejvind E. Lauritsen@EjvindELauritse/cygdrive/c/opencv/samples/cpp/
tutorial_code/core/mat_the_basic_image_container
$ gcc mat_the_basic_image_container.cpp
mat_the_basic_image_container.cpp: In function ‘int main(int, char**)’:
mat_the_basic_image_container.cpp:62:51: error: ‘FMT_PYTHON’ is not a member of ‘cv::Formatter’
mat_the_basic_image_container.cpp:63:51: error: ‘FMT_NUMPY’ is not a member of ‘cv::Formatter’
mat_the_basic_image_container.cpp:64:51: error: ‘FMT_CSV’ is not a member of ‘cv::Formatter’
mat_the_basic_image_container.cpp:65:51: error: ‘FMT_C’ is not a member of ‘cv::Formatter’

Why is OpenCV so hard to install? I just want it to work so I can code in a simple editor and then compile it with cygwin..

I'm so desperate! Heeelp! How does anyone get OpenCV to work, ever?

Edit After commenting out the error lines I get this:

Ejvind E. Lauritsen@EjvindELauritse/cygdrive/c/opencv/samples/cpp/tutorial_code/core/mat_the_basic_image_container
$ gcc mat_the_basic_image_container.cpp
collect2: ld afsluttet af signal 11 [Segmentation fault], core dumped /tmp/ccfA3Vvh.o:mat_the_basic_image_container.cpp:(.text+0xe): undefined reference to    `cv::Formatter::get(char const*)
/tmp/ccfA3Vvh.o:mat_the_basic_image_container.cpp:(.text+0x52): undefined reference to `std::cout'/tmp/ccfA3Vvh.o:mat_the_basic_image_container.cpp:(.text+0x57): undefined reference to `std::basic_ostream<char,std::char_traits<char> >& std::operator<< <std::char_traits<char> >(std::basic_ostream<char, std::char_traits<char> >& 
... plus a ton more