To run test.cpp from windows tutorial I had to edit include files. Why?

asked 2013-06-02 17:48:07 -0500

mtngardener gravatar image

In order to build the test.cpp from:

http://docs.opencv.org/doc/tutorials/introduction/windows_visual_studio_Opencv/windows_visual_studio_Opencv.html#windows-visual-studio-how-to

I had to edit highgui.hpp to add this:

include "opencv2/highgui/highgui_c.h"

This makes me worry that there is some underlying problem in my setup. Without this edit there were errors like "CV_CAP_PROP_FRAME_WIDTH isn't defined". The only place it appears to be defined is in highgui_c.h. And without this extra include highgui_c.h isn't included anywhere. Is there something I am missing?

edit retag flag offensive close merge delete

Comments

I was right there is more going wrong. When I try and do the camera tutorial I end up with the same highgui_c issue, and also one with core_c.h that is worse.

mtngardener gravatar imagemtngardener ( 2013-06-03 02:15:41 -0500 )edit

It appears that the answer might be that I should have been including via "Additional Include dirs" the full /install/include/opencv2/ directory. So really I did need to include the files, but it needs to be handled in a more general way. Somehow I missed this step in the tutorial.

mtngardener gravatar imagemtngardener ( 2013-06-05 00:16:06 -0500 )edit