Opencv Visual studio 2017 simple hack installation

This tutorial shows you how to use and install OpenCV 3 + in Visual Studio 2017. It is more hack than a proper install. Using Nuget packages in the package console is a simple installation of opencv without setting environmental variables and additional troubles with installation. All Visual Studio Versions need its own build of Opencv library also the Nuget packages. VS 2012 needs a version of libs V110. If you match the following pictures together you have my point.. VC12 libs is a version of Visual Studio 2013. VC14 is a lib version of Visual Studio 2015. Finally, Visual Studio 2017 needs a platform toolset and lib version V141. In OpenCV prebuild libs we need to wait for VC141. Hopefully. I never get the point of this naming convention. Visual studio year and V140 141 110 120 but. The current release is more confusing than the others.

opencv VS141

Opencv library has prebuild versions in that location after install.

opencv visual studio 2017


If you want to VC141 libs you need to build by CMAKE and Visual Studio 2017 like in my older tutorial.. The same approach but switched to the Visual Studio version.
Build OpenCV for the new version of Visual Studio in cmake

Opencv Visual Studio 2017 and older toolset

The best approach is to set the toolset in the Visual Studio project to V140 and use a prebuilt version of Opencv libs for VS 2015 or use Nuget packages in a simple 2 minutes installation also for version 2015 and enjoys coding in Visual Studio 2017 until somebody solves and builds the libs in VS 2017. 

Follow and enjoy coding. Building your own opencv is necessary in cases using the embedded and specific HW. In the case of coding on Windows its better to wait for prebuild libs than install CMake on a Windows machine. 


Opencv Visual Studio 2017 Step-by-step image tutorial

opencv VS141
opencv

opencv visual studio 2017opencv C ++ VS141

Opencv nuget package console Visual Studio 2017

The previous steps are really simple. Just open an empty project in C++ and add one source file source. cpp. There is no magic and nothing to block you from starting coding. Just follow the pictures and let me know if any problems occur. 
Add some programs, for example, to capture video from a web camera. If you try to build and link. You will fail with no resolve dependency. Now is the time to add. Opencv library. Nuget is the simplest option.



Now open the Nuget packages console TOOLS-NUGET Package Manager and Package Manager console. Do not be afraid of the console.


opencv visual studio 2017




 In console just write PM>  Install-Package opencvdefault 
ONLY part starts with Install..  and wait until your includes in Visual Studio are resolved and we see that the packages are successfully installed. We are not finished!!



opencv visual studio 2017


Now, if you try to build and link you will have trouble with linking. Right-click on the Project name Opencv go to general settings and change platform support to v140 to 2015.. If you do not have this V140 you need to install something like a compatibility pack or platform toolchain for VS140.

opencv visual studio 2017


Compile, link, and run.. Webcam is here. It is a hack, no proper installation for VS141 but there is no reason for it. There is no difference. Better hack than build by CMAKE on a Windows machine if you are not skilled enough.

Enjoy coding in Visual Studio 2017.


opencv visual studio 2017



Next Post Previous Post
5 Comments
  • Unknown
    Unknown April 1, 2017 at 4:32 AM

    hi
    i cant have Nuget packages on tootls
    please can you help me?

  • Unknown
    Unknown May 16, 2017 at 1:08 AM

    Helpful!

  • Wolfram Mathematica 11 Crack + Activation
    Wolfram Mathematica 11 Crack + Activation July 19, 2017 at 12:15 AM

    Very helpful suggestions that help in the optimizing website. Thank you for valuable suggestions.Powershell Studio 2017

  • Unknown
    Unknown October 2, 2017 at 7:45 AM

    I have vs2017...do I need the platform toolchain for VS140
    I'm getting Linker error 2019

  • Unknown
    Unknown November 22, 2017 at 9:03 PM

    Bro you save my life, runing OK!!!

Add Comment
comment url