【问题标题】:I built an OpenCV project in C++ visual studio 2019 using static library, but still needs dll file at the run time我使用静态库在 C++ Visual Studio 2019 中构建了一个 OpenCV 项目,但在运行时仍需要 dll 文件
【发布时间】:2020-11-25 18:40:02
【问题描述】:

我使用静态库在 C++ Visual Studio 2019 中构建了一个 OpenCV 项目: 我创建了 lib 文件的路径,并将运行时库(在项目属性--> C\C++--> 代码生成中)设置为多线程/MT。项目处于发布模式。 我也制作了类似于以下视频: https://www.youtube.com/watch?v=or1dAmUO8k0

【问题讨论】:

  • 您链接到的静态库可能是一个导入库。这些也有一个 .lib 扩展名,并与 dll 一起使用

标签: c++ opencv dll visual-studio-2019 static-libraries


【解决方案1】:

是的,您还需要将这些 dll 设置为系统环境变量。 dll 来自 [OpenCVInstallation]\build\x64\vc15\bin 和 OpenCVInstallation\build\bin,如下所示: the image

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2021-02-04
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多