Opencv - Can't find header files

10,040

Solution 1

append "opencv/build/include" to your include path.

if you built the opencv libraries yourself using cmake, make sure you run the INSTALL project, and add the folder, where it installed to.

When you run make install then the include files that you need are copied to a single directory determined by the makefiles and probably displayed as a part of the output.

Solution 2

I know what's going on. After built the entire solution, under the "opencv" solution strcutre, there is a folder called "CMakeTargets", expand this folder, you can see "INSTALL" project, and right-click this project, then select "build" option, then after installation, all libraries and head files will be located at the correct path. Like the following picture shows: here

Share:
10,040
Victor R. Oliveira
Author by

Victor R. Oliveira

Updated on June 04, 2022

Comments

  • Victor R. Oliveira
    Victor R. Oliveira almost 2 years

    I'm trying to start development with opencv. The problem is, until now I coul barely setup the opencv cos I cant find its header files.

    I made some research regarding to this subject but none of them were realy helpful, below some of the links:

    1. Where are the opencv2 include files?

    2. http://answers.opencv.org/question/14712/opencvhpp-not-in-opencv2/

    I made the built the files using CMAKE GUI - Built the code with MVS 11 x64 both debug and release. The compilation suceeded and I cant found libs and dlls, but no headers at all anywhere.

    Checkout the pics:

    Opencv2 folder

    enter image description here

    Local folder

    enter image description here

    So, now I ask, What am I missing here?

    Thanks for the help

    EDIT ONE:

    enter image description here

    enter image description here

    Is that what you meant?

    EDIT TWO:

    enter image description here

    I found some headers inside the source of opencv, and each of them is inside an specific folder, like core, highgui and so on - that is it? or something still wrong? cos I thought I should take the headers on the build, no on the source..