我下载了提取到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编译该程序?我无法实现。
最佳答案
关于visual-c++ - 在Windows 7命令行中使用OpenCV 2.4编译应用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15442551/