visual-c++ - 在Windows 7命令行中使用OpenCV 2.4编译应用

标签 visual-c++ opencv windows-7-x64

我下载了提取到C:\OpenCV2.4中的OpenCV 2.4。添加了一个系统变量OPENCV_DIR=C:\OpenCV2.4\build并将以下%OPENCV_DIR%\x64\vc10\bin添加到PATH

我的代码看起来像

#include <iostream>
#include <opencv\cv.h>
#include <opencv\highgui.h>

int main(){
   IplImage *img = cvLoadImage("imagen.jpg");
   if(!img){
      std::cout << "File not found\n" << std::endl;
   }
}

现在,从命令行工具中,我尝试了以下操作:
cl testCV.cpp /IC:\OpenCV2.4\build\include
并得到以下错误:
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\INCLUDE\intrin.h(26) : fatal error C1083: Cannot open include file: 'ammintrin.h': No such file or directory
如何用cl.exe编译该程序?我无法实现。

最佳答案

请安装SP1,这应该让你起来:)

还请看看这个漂亮的blog

关于visual-c++ - 在Windows 7命令行中使用OpenCV 2.4编译应用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15442551/

相关文章:

c++ - 为结构字段赋值时程序崩溃

c++ - 更新双操作是原子的

opencv - 改进哈里斯角检测器的结果

python - 找出哪个图像具有最多的黑色

c++ - RegOpenKeyEx() 错误

node.js - Windows 7 上的 npm install Restify 错误?

c++ - 如何使用消息访问mfc控件?

c++ - Qt Creator 2.6.1 + Qt 5 + C++11 + MSVC2010 编译器

C++/CMake :Undefined reference to imwrite in OpenCV

c++ - Visual Studio 2010 C++ SDL 游戏可以在编译它的计算机上运行,​​但不能在任何其他计算机上运行