Getting g++ to find all libraries in opencv install on windows 7 ultimate 64bit
Hi all,
I am trying to compile a C++ program that uses opencv on a computer running windows 7 ultimate 64bit. I have mingw installed. My g++ commandline is as follows. g++ -I C:\devkit\mingw\include -I C:\opencv\build\include\opencv2\highgui -I C:\opencv\build\include\opencv2\imgproc -I C:\opencv\build\include\opencv2\core -O3 BatchvOICe.cpp -o vl01.exe -l C:\opencv\build\x64\vc12\lib\opencv_core -l C:\opencv\build\x64\vc12\lib\opencv_imgproc -l C:\opencv\build\x64\vc12\lib\opencv_highgui In file included from BatchvOICe.cpp:8:0: C:\opencv\build\include\opencv2\highgui/highgui.hpp:46:33: fatal error: opencv2/ core/core.hpp: No such file or directory compilation terminated.
How do I solve this? I do not want to change include paths in the opencv source.
In addition, I have downloaded visual studio express 2013. I am happy to set build paths etc but what do I set? I see instructions only for visual studio 2012. I suspect they will be the same for 2013 and I did try them but I encounter the same errors.
Note: I have installed opencv-2_4_10.exe.
I see references to opencv 3.0. My program is basic therefore I am willing to switch to opencv 3 if compiling is easier. Pranav
You must add -I C:\opencv\build\include From there it will search for includes.
also, you cannot use the visual studio libs with mingw. (they're for usage with cl.exe only, not g++)
if you really must use g++, you will have to recompile the opencv libs using cmake (pretty similar to the way it's done on linux, just without needing any further dependancies)