OpenCV 3。x只包含一个lib - opencv_world.lib?

时间:2022-06-19 02:47:58

I'm trying to update my OpenCV version from 2.4.9 to the newest version, 3.10. I downloaded the Windows binary from here, having navigated there from the official OpenCV site. I then ran the installer, but the opencv\build\x64\vc12\lib directory only contained a couple files:

我试图将我的OpenCV版本从2.4.9升级到最新版本,3.10。我从这里下载了Windows二进制文件,从OpenCV官方站点导航到这里。然后我运行了安装程序,但是opencv\build\x64\vc12\lib目录只包含两个文件:

  • opencv_world310.lib
  • opencv_world310.lib
  • opencv_world310d.lib
  • opencv_world310d.lib
  • OpenCVConfig.cmake
  • OpenCVConfig.cmake
  • OpenCVModules.cmake
  • OpenCVModules.cmake
  • OpenCVModules-debug.cmake
  • OpenCVModules-debug.cmake
  • OpenCVModules-release.cmake
  • OpenCVModules-release.cmake

In the past editions though, this directory used to contain the required libraries, like opencv_calib3d249d.lib, opencv_contrib249d.lib, opencv_core249d.lib, etc.

在过去的版本中,这个目录曾经包含所需的库,比如opencv_calib3d249d。*,opencv_contrib249d。*,opencv_core249d。*,等等。

I imagine there's something I need to do with CMake, but I can't seem to figure it out--the old binaries used to compile everything for you. I also can't find anything in the documentation explaining this. Has anyone else come across this recently and have a solution?

我想我需要用CMake来做一些事情,但是我似乎搞不清楚——过去用来为您编译所有东西的二进制文件。我也在文档中找不到任何解释。最近有人遇到过这个问题并有解决办法吗?

1 个解决方案

#1


18  

By default, the binary version of OpenCV-3.x doesn't contain the separate libs like opencv_core.lib. Instead, these modules are integrated in opencv_world.lib, so you only need to link to it.

默认情况下,是OpenCV-3的二进制版本。x不像opencv_core.lib那样包含独立的libs。相反,这些模块集成在opencv_world中。lib,所以你只需要链接到它。

On the other hand, if you do want separate libs, i.e. uniform APIs with OpenCV-2.x, you can build it yourself using CMake by enable the libs that you want. Like

另一方面,如果您确实想要独立的libs,例如使用OpenCV-2的统一api。您可以通过启用您想要的libs来自己构建它。就像

OpenCV 3。x只包含一个lib - opencv_world.lib?

This will generate opencv_core.lib.

这将生成opencv_core.lib。

#1


18  

By default, the binary version of OpenCV-3.x doesn't contain the separate libs like opencv_core.lib. Instead, these modules are integrated in opencv_world.lib, so you only need to link to it.

默认情况下,是OpenCV-3的二进制版本。x不像opencv_core.lib那样包含独立的libs。相反,这些模块集成在opencv_world中。lib,所以你只需要链接到它。

On the other hand, if you do want separate libs, i.e. uniform APIs with OpenCV-2.x, you can build it yourself using CMake by enable the libs that you want. Like

另一方面,如果您确实想要独立的libs,例如使用OpenCV-2的统一api。您可以通过启用您想要的libs来自己构建它。就像

OpenCV 3。x只包含一个lib - opencv_world.lib?

This will generate opencv_core.lib.

这将生成opencv_core.lib。