由 susiel » 2009-11-25 9:39
又有了新问题。。
按教程里的需要build,生成需要调用的opencv库。是.dll的动态库,也有.lib的静态库
可是opencv的安装目录bin下有现有的.dll动态库,为什么不直接用dll的动态库呢? 而用build之后的.lib静态库呢?我直接用现有.dll的话 就会出错
错误是:
------ Build started: Project: face_pic, Configuration: Debug Win32 ------
1>Compiling...
1>face_pic.cpp
1>c:\program files\microsoft visual studio 8\vc\include\cvcompat.h(785) : warning C4819: The file contains a character that cannot be represented in the current code page (936). Save the file in Unicode format to prevent data loss
1>c:\program files\opencv2.0\project\include\opencv\highgui.hpp(53) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\program files\opencv2.0\project\include\opencv\highgui.hpp(53) : error C2143: syntax error : missing ',' before '&'
1>c:\program files\opencv2.0\project\include\opencv\highgui.hpp(54) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\program files\opencv2.0\project\include\opencv\highgui.hpp(54) : error C2143: syntax error : missing ',' before '&'
1>c:\program files\opencv2.0\project\include\opencv\highgui.hpp(58) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\program files\opencv2.0\project\include\opencv\highgui.hpp(58) : error C2143: syntax error : missing ',' before '&'
1>c:\program files\opencv2.0\project\include\opencv\highgui.hpp(63) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\program files\opencv2.0\project\include\opencv\highgui.hpp(63) : error C2143: syntax error : missing ',' before '&'
1>c:\program files\opencv2.0\project\include\opencv\highgui.hpp(64) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\program files\opencv2.0\project\include\opencv\highgui.hpp(64) : error C2143: syntax error : missing ',' before '&'
1>c:\program files\opencv2.0\project\include\opencv\highgui.hpp(66) : error C2146: syntax error : missing ';' before identifier 'imread'
1>c:\program files\opencv2.0\project\include\opencv\highgui.hpp(66) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\program files\opencv2.0\project\include\opencv\highgui.hpp(66) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\program files\opencv2.0\project\include\opencv\highgui.hpp(66) : error C2143: syntax error : missing ',' before '&'
1>c:\program files\opencv2.0\project\include\opencv\highgui.hpp(66) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\program files\opencv2.0\project\include\opencv\highgui.hpp(67) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\program files\opencv2.0\project\include\opencv\highgui.hpp(67) : error C2143: syntax error : missing ',' before '&'
1>c:\program files\opencv2.0\project\include\opencv\highgui.hpp(68) : error C2059: syntax error : ')'
1>c:\program files\opencv2.0\project\include\opencv\highgui.hpp(68) : error C2143: syntax error : missing ')' before ';'
1>c:\program files\opencv2.0\project\include\opencv\highgui.hpp(69) : error C2146: syntax error : missing ';' before identifier 'imdecode'
1>c:\program files\opencv2.0\project\include\opencv\highgui.hpp(69) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\program files\opencv2.0\project\include\opencv\highgui.hpp(69) : error C2086: 'int cv::Mat' : redefinition
1> c:\program files\opencv2.0\project\include\opencv\highgui.hpp(66) : see declaration of 'cv::Mat'
1>c:\program files\opencv2.0\project\include\opencv\highgui.hpp(69) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\program files\opencv2.0\project\include\opencv\highgui.hpp(69) : error C2143: syntax error : missing ',' before '&'
1>c:\program files\opencv2.0\project\include\opencv\highgui.hpp(69) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\program files\opencv2.0\project\include\opencv\highgui.hpp(70) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\program files\opencv2.0\project\include\opencv\highgui.hpp(70) : error C2143: syntax error : missing ',' before '&'
1>c:\program files\opencv2.0\project\include\opencv\highgui.hpp(72) : error C2059: syntax error : ')'
1>c:\program files\opencv2.0\project\include\opencv\highgui.hpp(72) : error C2143: syntax error : missing ')' before ';'
1>c:\program files\opencv2.0\project\include\opencv\highgui.hpp(78) : error C2143: syntax error : missing ';' before '<'
1>c:\program files\opencv2.0\project\include\opencv\highgui.hpp(78) : error C2182: 'Ptr' : illegal use of type 'void'
1>c:\program files\opencv2.0\project\include\opencv\highgui.hpp(78) : error C2433: 'Ptr' : 'inline' not permitted on data declarations
1>c:\program files\opencv2.0\project\include\opencv\highgui.hpp(78) : error C2988: unrecognizable template declaration/definition
1>c:\program files\opencv2.0\project\include\opencv\highgui.hpp(78) : error C2059: syntax error : '<'
1>c:\program files\opencv2.0\project\include\opencv\highgui.hpp(78) : error C2039: 'delete_obj' : is not a member of '`global namespace''
1>c:\program files\opencv2.0\project\include\opencv\highgui.hpp(81) : error C2039: 'delete_obj' : is not a member of '`global namespace''
1>c:\program files\opencv2.0\project\include\opencv\highgui.hpp(82) : error C2143: syntax error : missing ';' before '{'
1>c:\program files\opencv2.0\project\include\opencv\highgui.hpp(82) : error C2447: '{' : missing function header (old-style formal list?)
1>c:\program files\opencv2.0\project\include\opencv\highgui.hpp(126) : fatal error C1506: unrecoverable block scoping error
1>Build log was saved at "file://d:\liang\myPrac\hello\face_pic\Debug\BuildLog.htm"
1>face_pic - 39 error(s), 1 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
以前用1.1时 原来的工程没有出现这样的问题,换了2.0之后就出现了