Ask Your Question

cannot find -I C:\opencv\build\x64\vc14\lib C/C++ Problem

asked 2017-04-20 05:23:05 -0500

PankajPS gravatar image

Trying to run through C++ eclipse using opencv gender detection with fisherface algorithm. upon build project getting this error. cannot find -I C:\opencv\build\x64\vc14\lib C/C++ Problem

Can anybody suggest how to resolve this. ?????

edit retag flag offensive close merge delete


opencv version ?

berak gravatar imageberak ( 2017-04-20 05:31:19 -0500 )edit

1 answer

Sort by ยป oldest newest most voted

answered 2017-04-20 05:29:22 -0500

berak gravatar image

updated 2017-04-20 05:32:50 -0500

bad luck, if you're using eclipse, it probably uses some mingw as compiler, and the prebuild opencv libs are for vs2015 only, you cannot use them with mingw.

before you can compile any code of your own, you will have to build the opencv libs from src using cmake.

since you probably need the opencv_contrib repo as well (for the face module), see here for further instructions

edit flag offensive delete link more



Hi berak, Thanks for replying. I have followed up all the procedure as MinGW compiler and then build the opencv libs from src using cmake also configured the opencv_contrib repo as well. Post all this process completion i am getting this error. So can you provide few more suggestions inorder to solve this problem. Thanks

PankajPS gravatar imagePankajPS ( 2017-04-20 05:38:00 -0500 )edit

good ! hopefully, you ran make install , too, and your headers / libs should be in C:\opencv\build\install. so:

g++ my.cpp -I C:\opencv\build\install\include -L C:\opencv\build\install\x64\mingw\lib -lopencv_core320 -lopencv_imgproc320 -lopencv_imgcodecs320 -lopencv_face320 -o my.exe
berak gravatar imageberak ( 2017-04-20 05:44:28 -0500 )edit

It ran already using cmake installed is tat fine. or you want me to install make another one . As i am running through windows 10. Also my path doesn't have install folder in C:\opencv\build\install path but it has win-install folder C:\opencv\build\win-install in this we don't have the directories which you specified. So what you suggest me to do ???

PankajPS gravatar imagePankajPS ( 2017-04-20 06:08:41 -0500 )edit

Are you sure your windows path is aware of your OpenCV location?

StevenPuttemans gravatar imageStevenPuttemans ( 2017-04-21 02:48:26 -0500 )edit

Hi steven, Thanks for the reply. Yes it is. My total configuration is "Windows 10 -64 bit+MinGw+OpenCV+CMake+eclipse C++" and presently i am trying to identify the gender detection from images. Can you share the proper executable link so tat i can follow step by step inorder to setup opencv image detection without any error cleanly.thanks in advance

PankajPS gravatar imagePankajPS ( 2017-04-24 07:44:47 -0500 )edit

Question Tools

1 follower


Asked: 2017-04-20 05:23:05 -0500

Seen: 393 times

Last updated: Apr 20 '17