Ask Your Question

Location of .hpp files

asked 2016-03-23 06:38:28 -0500

Hi There.

This may seem like an odd question but I cannot determine where the header files are located on my pc. There are gazillions of files in different folders but am not sure which one.

In my visual studio project (which works fine) the include directory is: C:\opencv 310\build\include. If lets say we view the highgui.hpp file from that folder the only code in it is:


error this is a compatibility header which should not be used inside the OpenCV library


include "opencv2/highgui.hpp"

There is no reference to any source code here. According to this page (

imread() is a function declared in "opencv2/highgui/highgui.hpp" header file.

Where can I view the actual source code for these functions and why is the header file from above not contain anything?


edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted

answered 2016-03-23 07:02:43 -0500

Tetragramm gravatar image

I'm presuming you are using the installed version of OpenCV. All of the source code has been compiled into the .dll files that were installed. The .h and .hpp files just contain declarations and information about what is in, and how to call the .dll files. That way you and the compiler know what's there to be called.

You can see and download the source code for all of OpenCV HERE.

Incidentally, you should be up one level. You are at opencv2/highgui/highgui.hpp, and should be including opencv2/highgui.hpp

edit flag offensive delete link more

Question Tools

1 follower


Asked: 2016-03-23 06:38:28 -0500

Seen: 224 times

Last updated: Mar 23 '16