Ask Your Question

Revision history [back]

How to get static libs for installed modules?

I am building OpenCV from source on Windows 10. I have downloaded 'opencv' and 'opencv_contrib' from Github and used the CMake GUI to configure it to build, then opened the solution in Visual Studio 2017, built as Release and then built the install package.

Ultimately, I am trying to run some code which requires certain static libraries, for example:

  • opencv_cudaoptflow430.lib
  • opencv_cudaimgproc430.lib
  • etc.

These modules seem to have installed, and the headers are there, but I cannot find these libraries anywhere.

What I do have are the following (inside opencv/build/bin/Release):

  • opencv_perf_cudaoptflow.lib
  • opencv_perf_cudaimgproc.lib
  • etc.

But I'm not sure what these are, and it seems weird that I would need to modify code to use those libraries.

In CMake I set BUILD_SHARED_LIBS to false, which is what I thought I needed to make those libraries build, but it doesn't seem to have happened.

What do I need to do to make sure those libraries build?

Thanks!