Ask Your Question
0

How to get static libs for installed modules?

asked 2020-03-24 08:04:19 -0600

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!

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
1

answered 2020-03-25 21:29:04 -0600

AaronB gravatar image

You have to set BUILD_SHARED_LIBS off and then regenerate and then recompile the opencv. If you are using CUDA you also must have the NVIDIA libraries.

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2020-03-24 08:04:19 -0600

Seen: 1,546 times

Last updated: Mar 25 '20