1 | initial version |
If you are using the sample Visual Studio solution from here: https://github.com/GPUOpen-ProfessionalCompute-Libraries/amdovx-core
There are three projects in this solution, and you need to make sure you trying to add the library reference to the correct project, as each project in the solution has separate properties. runvx is the project you need to edit.
But... You may not actually need to edit it, as you can see it is already setup for linking to $(OpenCV_DIR)\x64\vc12\staticlib
Now. If you are here, two things could have gone wrong.
Did you download the correct version of OpenCV? OpenCV 3.0 contains VC11 and VC12 dlls (Visual Studio 2012 and 2013), while OpenCV 3.2.0 contains only VC14 dlls, which are only for Visual Studio 2015.
Did you add the OpenCV folder to the windows Environmental Variables? If not, press the Windows Key and Pause at the same time. Then select "Advanced System Settings" then "Environmental Variables". You want to look at the lower portion of this screen, titled "System variables" Press "New..." Then Enter: OpenCV_DIR into the Variable Name, and the path to your OpenCV directory into followed by "opencv\build" into the Variable Value.
For more details on step 2. When you download and install the fairly large OpenCV exe, it asks you were you want to extract the data too. This is actually not a location for temporary files, but the actual files you are going to need. So I extracted them to: C:\OpenGL\opencv-3.0. I also have OpenCV 3.2 installed for use with Visual Studio 2015.....although you can only set your Environmental Variable once, so you have to choose which OpenCV version will be "default". With my configuration for Visual Studio 2013, my Environmental Variable Value is: C:\OpenGL\opencv-3.0\opencv\build
A separate note on Visual Studio. Microsoft would very much like you to download Visual Studio 2017 or whatever the current version is, however this usually is not the best idea because you will have to convert solutions built on earlier versions of Visual Studio to your newer version. Also there is a different C++ compiler for each Visual Studio version, and guess what....The DLLs you are trying to work with MUST match the compiler you're trying to use. So even if you upgrade the solution, there is as of 2017-06-08, no version of OpenCV that supports Visual Studio 2017.
In order to download previous version of visual studio, you have to create a free account with microsoft. You can sign up using this link, and after you are logged in, visit this link: https://www.visualstudio.com/vs/older-downloads/
Then select "Downloads" from the menu. In the search box type "Visual Studio Community 2013". For me there was only one result, "Visual Studio Community 2013 with Update 5" (Release date 11/13/2015) You can repeat these steps for "Visual Studio Community 2015" if you are interested in using OpenCV 3.2.