Steve
Steve

Reputation: 4097

Open CV 2.2 Include Directory Missing

I have several Windows 7 64bit systems with OpenCV 2.2 installed on them using CMake and Visual Studio 2008 Standard. CMake generates everything in C:\libs\OpenCV-2.2.0\build just fine and Visual Studio 2008 compiles everything without complaint.

However, every time I do this process on various machines I find that the include directory (C:\libs\OpenCV-2.2.0\build\include\opencv2) is either empty or nearly so. I usually end up thrashing around compiling different versions and poking on random project files until it appears and every time I think I have it figured out. However, with each new install I'm back to the begining.

Is this a known issue for 64bit build of OpenCV 2.2 on Windows 7 64bit using Visual Studio 2008 and is there a known workaround?

Various questions here seem to be hinting at the same thing and guides online are either old or don't reference the problem at all.

Upvotes: 4

Views: 2476

Answers (4)

Acimaz
Acimaz

Reputation: 171

I just had the same problem. The Answer which explains that you have to rightclick and build the "INSTALL" project after you have built the debug/release works for me now. BUT: for me it was not a "build" folder which was created, but a folder called "install". Inside of that folder there is a include folder now which contains all the stuff you need for the include. The OpenCV version im using is OpenCV v3.2.

Upvotes: 3

sotiraw
sotiraw

Reputation: 11

well i have the same problem with visual studio 2010, and the answer ""To solve this problem compile everything in release and debug then right click the INSTALL project in Visual Studio 2008 and choose Build. This will "install" numerous files and move all the include files into the proper location"" cannot work on this. because when you choose 2010 visual configuration there are no option to do debg or release. u do this afterwars from visual studio when complile in debug or release mod. has one anny answer. you my friend that have managed to create a full buld properly can you please make one with qt support ,and with examples and docs cmake configuration amd please e mail it to me?? it wont take you more than some minutes and this will be a great help because i try many days to solve it

Upvotes: 1

Steve
Steve

Reputation: 4097

To solve this problem compile everything in release and debug then right click the INSTALL project in Visual Studio 2008 and choose Build. This will "install" numerous files and move all the include files into the proper location.

Now /include will contain subfolders

  • opencv
  • opencv2

and /include/opencv2 will contain numerous subfolders:

  • calib3d
  • contrib
  • core
  • feature2d
  • flann
  • gpu
  • highgui
  • imgproc
  • legacy
  • ml
  • objdetect
  • video

Upvotes: 7

Martin Beckett
Martin Beckett

Reputation: 96147

How are you making \build\ ?

I didn't think opencv did out-of-source builds properly. At least I've never got them to work - have you tried setting the build dir to a completely separate tree?

Upvotes: 0

Related Questions