c++ - 链接 : fatal error LNK1104: cannot open file 'opencv_calib3d245d.lib' (OpenCV 2. 4.9)

标签 c++ visual-studio-2010 opencv visual-c++

我在带有 Visual Studio C++ 2010 Express 的 Windows 7 中使用 OpenCV 2.4.9。

我下载了OpenCV 2.4.9,按照教程安装。包括设置环境变量。

http://opencv-srf.blogspot.com.br/2013/05/installing-configuring-opencv-with-vs.html

除了编译器的版本,我用“vc10”代替了“vc11”(就像教程中那样)。

好吧,我在本教程中所做的其余部分完全相同。

我正在尝试运行这个简单的代码:

#include <stdio.h>
#include <opencv2/imgproc/imgproc.hpp>
#include <opencv2/highgui/highgui.hpp>

using namespace cv;

int main ( int argc, char **argv ) {

    Mat image = imread("9-002.tif", CV_LOAD_IMAGE_GRAYSCALE);

    adaptiveThreshold(image, image, 255, ADAPTIVE_THRESH_MEAN_C, THRESH_BINARY_INV, 111, -20);

    imwrite("rs_9-002.tif", image);

    return 0;
}

当我运行项目时,我得到了这个:

1>------ Build started: Project: Projeto de TESTES, Configuration: Debug Win32 ------
1>  main.cpp
1>LINK : fatal error LNK1104: cannot open file 'opencv_calib3d245d.lib'
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

我的项目的属性如下:

enter image description here enter image description here

我不知道如何解决这个问题。知道是什么导致了这个错误吗?

最佳答案

查看您的附加依赖项,您列出了 opencv-2.4.5 而不是 opencv-2.4.9 的库。附加依赖项中的库名为 *245d.lib 而不是 *249d.lib。您将需要编辑库名称中包含 245 的所有条目,并将其替换为 249。确保对您使用的所有配置(调试、发布...)执行此操作。

关于c++ - 链接 : fatal error LNK1104: cannot open file 'opencv_calib3d245d.lib' (OpenCV 2. 4.9),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24297145/

相关文章:

c++ - const变量的static_assert

c++ - 使用动态内存复制类

c++ - 如何从模板基类派生非模板类

c++ - 使用 Boost.Asio 连接到域以托管服务器

c++ - OpenCV:Mat::reshape() 什么都不做

python - opencv在facedetction中找到面部中心

opencv - 我如何使用opencv测量视频中检测到的物体与摄像机的距离?

c++ - void函数中的2darray动态分配

c++ - VS2010中全局变量的定义

visual-studio - Microsoft Visual Studio 自动完成选择问题