Ask Your Question
0

Cannot setup opencv 4.1.1 with vs2017

asked Jul 30 '19

sturmi1337 gravatar image

Hello, i've tried to use opencv 4.1.1 with vs17 and followed the official "How to install on Windows" Guide but after doing all steps it cannot find the opencv files. Does anyone has a clue what I'm doing wrong?

Preview: (hide)

Comments

Does anyone has a clue what I'm doing wrong?

not unless you tell us in detail, what you actually tried, and show us the resulting errors.

(just mentioning "i followed xyz" is utterly useless to help).

berak gravatar imageberak (Jul 30 '19)edit

I cannot share much. I followed the official Install Guide from Website (https://docs.opencv.org/2.4/doc/tutor...) and error is basically that it cannot find opencv files in Visual Studio. If i want to include opencv it does not find it and when i paste a sample code it marks the includes and says it cannot be opened.

sturmi1337 gravatar imagesturmi1337 (Aug 1 '19)edit

1 answer

Sort by » oldest newest most voted
2

answered Aug 5 '19

gino0717 gravatar image

updated Aug 6 '19

in your project, go to

[Project(P)] -> [ (your project name) property ] -> [VC++ Directories]

you would see something like: https://docs.microsoft.com/en-us/cpp/...

add the path of "include" folder of openCV to [Include Directories]

add the path of " *.lib " folder of openCV (Maybe in /opencv/build/x64/vc15/lib/) to [Library Directories]

then go to [Linker] in the [ (your project name) property ]

add the lib name to [Linker] -> [Input] -> [Additional Dependencies] (Maybe opencv_world411.lib)

then go to the computer and add the folder of *.dll (Maybe /opencv/build/x64/vc15/bin/) to the environment variables path

Preview: (hide)

Comments

thanks alot! Works now

sturmi1337 gravatar imagesturmi1337 (Aug 6 '19)edit
1

An alternative answer is : use cmake

LBerger gravatar imageLBerger (Aug 6 '19)edit

I use VS 2019 with opencv 4.1.1 for remotely debug a utunbu(18.04) project with opencv 3.3.1. configured as you said, but it result in the following error message. What is the problem of the configuration or other problem? By the way, there is no problem when local debugging a win 10 project with opencv 4.1.1 with the same configuration. 1>g++ : error : opencv_world411d.lib: No such file or directory 1>g++ : error : opencv_world411.lib: No such file or directory

cuter9 gravatar imagecuter9 (Sep 5 '19)edit

Question Tools

1 follower

Stats

Asked: Jul 30 '19

Seen: 1,431 times

Last updated: Aug 06 '19