Opencv版本控制和编译。来自地狱的Aka编译器

时间:2015-06-21 15:44:29

标签: c++ opencv visual-studio-2012 compilation

所以我只是在windows中做一个基本的opencv应用程序,visual studio 2012 express。我想知道这是一个可修复的错误集,还是我将不得不从头开始重新编译opencv,因为那样会很糟糕。如果它是一个可修复的错误,请告诉我如何解决此问题以进行简单的编译。

#pragma once 
#include <stdio.h>
#include <iostream>
#include "opencv.hpp"
#include "highgui.hpp"

using namespace std;
using namespace cv;

int main( int argc, char** argv )
{
Mat image;
image = imread( argv[1], 1 );

if( argc != 2 || !image.data )
{
printf( "No image data \n" );
return -1;
}
namedWindow( "Display Image", CV_WINDOW_AUTOSIZE );
imshow( "Display Image", image );
waitKey(0);
cout<<"hello world"<<endl;
return 0;
}

C / C ++ - &gt; general-&gt;其他包含目录 C:\ OpenCV的\建设\包括 C:\ OpenCV的\建设\包括\ OpenCV的 C:\ OpenCV的\建设\包括\ opencv2 //我也知道这是一种霰弹枪的方法,但我开始怀疑我的编译器的理智是通过东西来解决的

链接器&GT; input-&gt;其他依赖项 opencv_core300.lib opencv_imgproc300.lib opencv_highgui300.lib opencv_ml300.lib opencv_video300.lib opencv_features2d300.lib opencv_calib3d300.lib opencv_objdetect300.lib opencv_flann300.lib

Linker-&gt; general-&gt;其他库目录 C:\ OpenCV的\建设\ 86 \ VC12 \ LIB C:\ OpenCV的\建设\ 86 \ VC12 \ BIN C:\ OpenCV的\建设\ 86 \ VC12 \ staticlib //我知道这部分是一个猎枪方法,只有staticlib应该在那里,但其他几个教程使用了lib和bin,我认为它不能伤害

Linker-&gt;命令行 / OUT:&#34; C:\ Users \ Paul \ Documents \ Visual Studio 2012 \ Projects \ opencv \ Debug \ opencv.exe&#34; / MANIFEST / NXCOMPAT / PDB:&#34; C:\ Users \ Paul \ Documents \ Visual Studio 2012 \ Projects \ opencv \ Debug \ opencv.pdb&#34; / DYNAMICBASE&#34; opencv_core300.lib&#34; &#34; opencv_imgproc300.lib&#34; &#34; opencv_highgui300.lib&#34; &#34; opencv_ml300.lib&#34; &#34; opencv_video300.lib&#34; &#34; opencv_features2d300.lib&#34; &#34; opencv_calib3d300.lib&#34; &#34; opencv_objdetect300.lib&#34; &#34; opencv_flann300.lib&#34; &#34; KERNEL32.LIB&#34; &#34; USER32.LIB&#34; &#34; GDI32.LIB&#34; &#34; winspool.lib&#34; &#34; comdlg32.lib&#34; &#34; advapi32.lib&#34; &#34; SHELL32.LIB&#34; &#34; ole32.lib&#34; &#34; oleaut32.lib&#34; &#34; UUID.LIB&#34; &#34; odbc32.lib&#34; &#34; odbccp32.lib&#34; / DEBUG / MACHINE:X86 / INCREMENTAL / PGD:&#34; C:\ Users \ Paul \ Documents \ Visual Studio 2012 \ Projects \ opencv \ Debug \ opencv.pgd&#34; / SUBSYSTEM:CONSOLE / MANIFESTUAC:&#34; level =&#39; asInvoker&#39; uiAccess =&#39;假&#39;&#34; /ManifestFile:"Debug\opencv.exe.intermediate.manifest" / ERRORREPORT:PROMPT / NOLOGO / LIBPATH:&#34; C:\ opencv \ build \ x86 \ vc12 \ lib&#34; / LIBPATH:&#34; C:\的OpenCV \建立\ 86 \ VC12 \ staticlib&#34; / LIBPATH:&#34; C:\的OpenCV \建立\ 86 \ VC12 \ BIN&#34; / TLBID:1

以下是编译器的回复: 1&gt; opencv_core300.lib(alloc.obj):错误LNK2038:检测到不匹配&#39; _MSC_VER&#39;:值&#39; 1800&#39;没有匹配价值&#39; 1700&#39;在Source.obj中 1&gt; opencv_core300.lib(alloc.obj):错误LNK2038:检测到不匹配&#39; _ITERATOR_DEBUG_LEVEL&#39;:值&#39; 0&#39;不匹配价值&#39; 2&#39;在Source.obj中 1&gt; opencv_core300.lib(alloc.obj):错误LNK2038:检测到不匹配&#39; RuntimeLibrary&#39;:value&#39; MT_StaticRelease&#39;没有匹配的价值&#39; MDd_DynamicDebug&#39;在Source.obj中 致命错误LNK1120:367未解析的外部

还有很多错误,但其中大多数都涉及上述错误的变体。我保证,如果我得到一个有效的项目,我将编写并发布一个指南,用于在vs2012express中使用opencv 3.0。

0 个答案:

没有答案