Ask Your Question

Visual studio 10 and openCV ?

asked 2014-05-01 08:36:40 -0500

Guys, how can I install openCV at Visual Studio 10? I tried to follow this link:

but I got error : 1 IntelliSense: cannot open source file "opencv2/core.hpp"

I have set all the environment path from the link...

Any clues ? thanks

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted

answered 2014-05-01 09:33:28 -0500

AR0x7E7 gravatar image

looks like your setup for "Additional Include Directories" at "Configuration Properties -> C/C++ -> General" is wrong - more information needed: what's your current PATH, where is your opencv directory?

I.e. my setup (Win7 64 bit, VS2012, opencv 2.4.9):

"Additional Include Directories": $(OPENCV_DIR)\include

Win7 System Variables:

OPENCV_DIR: C:\opencv\build PATH: %OPENCV_DIR%\bin;

You should not copy paths from tutorials blindly, but refactor them to your own system. Look out for '\' use everywhere instead of '/'.

edit flag offensive delete link more


Now I can compile it but I got :

error LNK1112: module machine type 'x64' conflicts with target machine type 'X86' ocvtest\opencv_highgui249d.lib(opencv_highgui249d.dll)

What's the issue ? thanks

bianchi gravatar imagebianchi ( 2014-05-01 21:25:32 -0500 )edit

you must change target machine type :: x64. The best way is you can open opencv soure project and check all setting when you bulid opencv scource project.

wuling gravatar imagewuling ( 2014-05-02 22:54:05 -0500 )edit

done, I can compile it now, thanks folks

bianchi gravatar imagebianchi ( 2014-05-07 00:46:17 -0500 )edit

Question Tools

1 follower


Asked: 2014-05-01 08:36:40 -0500

Seen: 662 times

Last updated: May 01 '14