Missing .hhp files after installing with Cmake + minGw

asked 2014-04-08 11:29:55 -0600

Juarez_ASF gravatar image

updated 2014-04-08 17:22:04 -0600

I've followed a couple of tutorials in order to install OpenCV under windows and everything went fine. The problem is that after installation I don't have the headers that I was expecting to have under build/opencv2, such as "opencv2/highgui/highgui.hpp" and "opencv2/opencv.hpp". At this folder I only found "opencv_modules.hpp". Opening this file I see something like:

define HAVE_OPENCV_CALIB3D

define HAVE_OPENCV_CONTRIB

define HAVE_OPENCV_CORE ...

Also, the build examples are working, so I know that the libraries have been successfully build. I have lots of .ddl files at /build/bin and lots of .ddl.a at /build/lib. Why am I missing the headers? If the library is somehow build, how to compile a project that includes openCV?

I have been using OpenCV for a while but only on Linux. Now I need to compile it on windows and I'm finding everything much more complicated.


EDIT:

well, it turns out that I was not running the install process. After hitting "cmake -P cmake_install.cmake" the folder with the headers i was looking for was generated. After this I tryed to install opencv at a friend's machine and found another problem:

CMake Error at cmake_install.cmake:31 (FILE): file INSTALL cannot find "/cygdrive/c/OpenCV/build/C:/OpenCV/build/opencv2/opencv_modules.hpp".

I don't remember my previous installation having this ".../C/...": directory. Indeed there is no such 'opencv_modules.hpp' file at this folder, but why is this 'C' file there at first place? What is going on?

Another thing akward is that "/cygdrive/". I'm not sure, but this seems to be related to cygwin. I belived to be using only minGW, though. God! Such a hard time installing it! My binnaries from the first installation worked on this other computer, but i want to install it from scratch in order to make sure that I mastered it.

edit retag flag offensive close merge delete

Comments

1

did you run the INSTALL proj ? ( or more likely, 'make install' for mingw ) that should have copied the headers & dlls & libs to whereever CMAKE_INSTALL_PREFIX points to (build/install seems to be the default there).

berak gravatar imageberak ( 2014-04-08 11:36:15 -0600 )edit

Well, I've figured it out about half an hour after posting it here but I wasn't allowed to answer my own question, since I'm new here. You are correct, I didn't hit install, although the command I used wasn't exactly the one you suggested. After running mingw32-make you ought to run "cmake -P cmake_install.cmake" at the build folder. After this it was generated C:\OpenCV\build\install\include\opencv2, which is the folder with the headers I was looking for.

Juarez_ASF gravatar imageJuarez_ASF ( 2014-04-08 12:40:46 -0600 )edit
1

oh, nice.

maybe, you should adjust the CMAKE_INSTALL_PREFIX variable to something you really like

( probably out of the opencv src tree),

and rerun it ?

berak gravatar imageberak ( 2014-04-08 12:54:50 -0600 )edit

hahaha that's actually a really good tip. Thank you.

Juarez_ASF gravatar imageJuarez_ASF ( 2014-04-08 13:23:00 -0600 )edit

I successed on one computer then went to install into my friend's computer and again i'm meeting an error when trying to install. here it is: CMake Error at cmake_install.cmake:31 (FILE): file INSTALL cannot find "/cygdrive/c/OpenCV/build/C:/OpenCV/build/opencv2/opencv_modules.hpp".

I don't remember my previous installation having this C: directory. Indeed there is no such 'opencv_modules.hpp' file at this folder, but why is this 'C' file there at first place? What is going on?

Juarez_ASF gravatar imageJuarez_ASF ( 2014-04-08 17:05:58 -0600 )edit

Another thing akward is that "/cygdrive/". I'm not sure, but this seems to be related to cygwin. I belived to be using only minGW, though. God! Such a hard time installing it! My binnaries from the first installation worked on this other computer, but i wanted to install it from zero in order to make sure that I mastered it.

Juarez_ASF gravatar imageJuarez_ASF ( 2014-04-08 17:13:07 -0600 )edit