windows install missing files [closed]

asked 2017-10-20 17:55:20 -0500

dr_eck gravatar image

I just installed OpenCV from the SourceForge installer, so I should have the pre-built libraries. I also defined OPENCV_DIR and added %OPENCV_DIR%\bin to the path. Then I created a new app in VS2017 and added the statements from the "Test It!" section of the 'How to build applications with OpenCV inside the "Microsoft Visual Studio"' tutorial.

Problem #1: VS could not find <opencv2\core.hpp> When I went to this folder, I discovered that there is only one file in it, opencv.hpp. Where are the other files? I tried downloading the OpenCV 3.3 installer again and installing into a different folder, but the results were the same. Is the installer buggy?

Problem #2: This is probably a result of #1, but the namespace cv is not defined.

Do I have to install CMake and download the source from GitHub just to get started?

edit retag flag offensive reopen merge delete

Closed for the following reason the question is answered, right answer was accepted by berak
close date 2017-10-24 16:06:26.795811

Comments

  • the prebuild libs are for vs2015 only. for any other version, you WILL have to build from src, using cmake and all.

  • there should be a "build/include" or "build/install/include" folder there. use that, not the toplevel one.

berak gravatar imageberak ( 2017-10-20 18:06:19 -0500 )edit

Thank you very much for these tips. I found the build/include folder in the VS2015 version, and it has all of the include files. I also used VS2017 to build the latest sources. Unfortunately, I'm back to hide-and-seek. After some hunting, I found the CMakeBuilds folder, but there are no "build" and "sources" folders. Any advice? In the interim, I'll just keep hunting.

dr_eck gravatar imagedr_eck ( 2017-10-20 19:38:47 -0500 )edit

after you build the INSTALL project, everything nessecary should be in build/install

berak gravatar imageberak ( 2017-10-21 01:44:08 -0500 )edit

Thank you! In VS2017, there is an Install item on the CMAKE menu. I had not noticed that before (I'm new to CMake projects in VS2017.) Now I just have to figure out how to tell CMake where string, vector and stdarg.h are and I should be in business.

dr_eck gravatar imagedr_eck ( 2017-10-21 23:00:52 -0500 )edit

I rebuilt OpenCV and reran the install and everything worked perfectly. Wonderful!

dr_eck gravatar imagedr_eck ( 2017-10-24 16:01:37 -0500 )edit