build applications with OpenCV inside the Microsoft Visual Studio

asked 2013-04-26 04:49:39 -0500

etudiante gravatar image

Hi , when i try to build the application with OpenCV inside the Microsoft Visual Studio it tell me Impossible d'ouvrir le fichier include : 'opencv2/imgproc/imgproc.hpp' : No such file or directory i do all the step in the tutorial i dont know whats the problem ,can you help me (i work with microsoft visual studio 2005)

edit retag flag offensive close merge delete

Comments

Did you configure the include path in your project ? You must add the opencv...\include directory in the include path

Rogeeeer gravatar imageRogeeeer ( 2013-04-26 05:00:47 -0500 )edit

i create a new variable named OPENCV_DIR with value D:\OpenCV\Build\x86\vc10; and i add %OPENCV_DIR%\bin to the PATH there is another step ??

etudiante gravatar imageetudiante ( 2013-04-26 05:22:28 -0500 )edit

environment variable are used by the system to tell him where to find dll when executing the code, inside or outside of visual studio.

But you also have to tell the compiler where he can find your headers. It's two different things.

Right-click on the project in the solution explorer, an click properties. Then in C/C++ section, select property page and modify the "Additional include directories". (add opencv/.../include/ depending on your folder's structure.

Rogeeeer gravatar imageRogeeeer ( 2013-04-26 05:31:50 -0500 )edit

in additional Include directories i write $ ( OPENCV_DIR ) \ include , like the tutorial ,thats true ??

etudiante gravatar imageetudiante ( 2013-04-26 05:42:19 -0500 )edit

Yes, if the include directory is in the $(OPENCV_DIR) specified in your environment variables. If it still don't work try to put the path to the include directory directly, without using the environment variable

Rogeeeer gravatar imageRogeeeer ( 2013-04-26 07:02:38 -0500 )edit