Ask Your Question
0

Cannot setup opencv 4.1.1 with vs2017

asked 2019-07-30 15:20:18 -0600

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?

edit retag flag offensive close merge delete

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 ( 2019-07-30 15:31:29 -0600 )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 ( 2019-08-01 11:19:28 -0600 )edit

1 answer

Sort by ยป oldest newest most voted
2

answered 2019-08-04 21:30:31 -0600

gino0717 gravatar image

updated 2019-08-06 03:20:57 -0600

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

edit flag offensive delete link more

Comments

thanks alot! Works now

sturmi1337 gravatar imagesturmi1337 ( 2019-08-06 02:36:15 -0600 )edit
1

An alternative answer is : use cmake

LBerger gravatar imageLBerger ( 2019-08-06 03:31:23 -0600 )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 ( 2019-09-05 11:38:06 -0600 )edit

Question Tools

1 follower

Stats

Asked: 2019-07-30 15:20:18 -0600

Seen: 1,394 times

Last updated: Aug 06 '19