bonjour
voila j'ai un projet à développer avec opencv et j'ai un problème des erreurs de compilation que j'arrive pas à trouver une solution pour compiler le code
j'ai installer la version 1.1 de opencv avec microsoft visual studion 2008 sous vista , le programme que j'ai essayé c'est a sample code pour la detection de mouvement motempl.c .j'ai ajouté les include, lib, linkers , src , les .dll au systeme32
quand je debug le programme voici la liste d'erreur :
1>Compiling...
1>main.cpp
1>c:\program files\opencv\otherlibs\highgui\highgui.h(347) : error C2065: 'HWND' : undeclared identifier
1>c:\program files\opencv\otherlibs\highgui\highgui.h(347) : error C2065: 'UINT' : undeclared identifier
1>c:\program files\opencv\otherlibs\highgui\highgui.h(347) : error C2065: 'WPARAM' : undeclared identifier
1>c:\program files\opencv\otherlibs\highgui\highgui.h(347) : error C2065: 'LPARAM' : undeclared identifier
1>c:\program files\opencv\otherlibs\highgui\highgui.h(347) : error C2062: type 'int' unexpected
1>c:\program files\opencv\otherlibs\highgui\highgui.h(348) : error C2065: 'CvWin32WindowCallback' : undeclared identifier
1>c:\program files\opencv\otherlibs\highgui\highgui.h(348) : error C2146: syntax error : missing ')' before identifier 'on_preprocess'
1>c:\program files\opencv\otherlibs\highgui\highgui.h(348) : warning C4229: anachronism used : modifiers on data are ignored
1>c:\program files\opencv\otherlibs\highgui\highgui.h(348) : error C2182: 'cvSetPreprocessFuncWin32' : illegal use of type 'void'
1>c:\program files\opencv\otherlibs\highgui\highgui.h(348) : error C2059: syntax error : ')'
1>c:\program files\opencv\otherlibs\highgui\highgui.h(349) : error C2065: 'CvWin32WindowCallback' : undeclared identifier
1>c:\program files\opencv\otherlibs\highgui\highgui.h(349) : error C2146: syntax error : missing ')' before identifier 'on_postprocess'
1>c:\program files\opencv\otherlibs\highgui\highgui.h(349) : warning C4229: anachronism used : modifiers on data are ignored
1>c:\program files\opencv\otherlibs\highgui\highgui.h(349) : error C2182: 'cvSetPostprocessFuncWin32' : illegal use of type 'void'
1>c:\program files\opencv\otherlibs\highgui\highgui.h(349) : error C2059: syntax error : ')'
1>c:\program files\opencv\otherlibs\highgui\highgui.h(370) : error C2146: syntax error : missing ';' before identifier 'NormalizeRect'
1>c:\program files\opencv\otherlibs\highgui\highgui.h(370) : error C2433: 'RECT' : 'inline' not permitted on data declarations
1>c:\program files\opencv\otherlibs\highgui\highgui.h(370) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\program files\opencv\otherlibs\highgui\highgui.h(370) : error C2146: syntax error : missing ')' before identifier 'r'
1>c:\program files\opencv\otherlibs\highgui\highgui.h(370) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\program files\opencv\otherlibs\highgui\highgui.h(370) : error C2059: syntax error : ')'
1>c:\program files\opencv\otherlibs\highgui\highgui.h(371) : error C2146: syntax error : missing ';' before identifier 'NormalizeRect'
1>c:\program files\opencv\otherlibs\highgui\highgui.h(371) : error C2433: 'RECT' : 'inline' not permitted on data declarations
1>c:\program files\opencv\otherlibs\highgui\highgui.h(371) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\program files\opencv\otherlibs\highgui\highgui.h(371) : error C2086: 'int RECT' : redefinition
1> c:\program files\opencv\otherlibs\highgui\highgui.h(370) : see declaration of 'RECT'
1>c:\program files\opencv\otherlibs\highgui\highgui.h(371) : error C2146: syntax error : missing ')' before identifier 'r'
1>c:\program files\opencv\otherlibs\highgui\highgui.h(371) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\program files\opencv\otherlibs\highgui\highgui.h(371) : error C2374: 'NormalizeRect' : redefinition; multiple initialization
1> c:\program files\opencv\otherlibs\highgui\highgui.h(370) : see declaration of 'NormalizeRect'
1>c:\program files\opencv\otherlibs\highgui\highgui.h(371) : error C2059: syntax error : ')'
1>c:\program files\opencv\otherlibs\highgui\highgui.h(372) : error C2143: syntax error : missing ';' before '{'
1>c:\program files\opencv\otherlibs\highgui\highgui.h(372) : error C2447: '{' : missing function header (old-style formal list?)
1>c:\program files\opencv\otherlibs\highgui\highgui.h(392) : error C2146: syntax error : missing ')' before identifier 'sr'
1>c:\program files\opencv\otherlibs\highgui\highgui.h(392) : error C2433: 'RectToCvRect' : 'inline' not permitted on data declarations
1>c:\program files\opencv\otherlibs\highgui\highgui.h(392) : error C2440: 'initializing' : cannot convert from 'int' to 'CvRect'
1> No constructor could take the source type, or constructor overload resolution was ambiguous
1>c:\program files\opencv\otherlibs\highgui\highgui.h(392) : error C2059: syntax error : ')'
1>c:\program files\opencv\otherlibs\highgui\highgui.h(393) : error C2146: syntax error : missing ')' before identifier 'sr'
1>c:\program files\opencv\otherlibs\highgui\highgui.h(393) : error C2433: 'RectToCvRect' : 'inline' not permitted on data declarations
1>c:\program files\opencv\otherlibs\highgui\highgui.h(393) : error C2374: 'RectToCvRect' : redefinition; multiple initialization
1> c:\program files\opencv\otherlibs\highgui\highgui.h(392) : see declaration of 'RectToCvRect'
1>c:\program files\opencv\otherlibs\highgui\highgui.h(393) : error C2440: 'initializing' : cannot convert from 'int' to 'CvRect'
1> No constructor could take the source type, or constructor overload resolution was ambiguous
1>c:\program files\opencv\otherlibs\highgui\highgui.h(393) : error C2059: syntax error : ')'
1>c:\program files\opencv\otherlibs\highgui\highgui.h(394) : error C2143: syntax error : missing ';' before '{'
1>c:\program files\opencv\otherlibs\highgui\highgui.h(394) : error C2447: '{' : missing function header (old-style formal list?)
1>c:\program files\opencv\otherlibs\highgui\highgui.h(399) : error C2146: syntax error : missing ';' before identifier 'CvRectToRect'
1>c:\program files\opencv\otherlibs\highgui\highgui.h(399) : error C2433: 'RECT' : 'inline' not permitted on data declarations
1>c:\program files\opencv\otherlibs\highgui\highgui.h(399) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\program files\opencv\otherlibs\highgui\highgui.h(399) : error C2086: 'int RECT' : redefinition
1> c:\program files\opencv\otherlibs\highgui\highgui.h(370) : see declaration of 'RECT'
1>c:\program files\opencv\otherlibs\highgui\highgui.h(399) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\program files\opencv\otherlibs\highgui\highgui.h(400) : error C2146: syntax error : missing ';' before identifier 'CvRectToRect'
1>c:\program files\opencv\otherlibs\highgui\highgui.h(400) : error C2433: 'RECT' : 'inline' not permitted on data declarations
1>c:\program files\opencv\otherlibs\highgui\highgui.h(400) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\program files\opencv\otherlibs\highgui\highgui.h(400) : error C2086: 'int RECT' : redefinition
1> c:\program files\opencv\otherlibs\highgui\highgui.h(370) : see declaration of 'RECT'
1>c:\program files\opencv\otherlibs\highgui\highgui.h(401) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\program files\opencv\otherlibs\highgui\highgui.h(402) : error C2146: syntax error : missing ';' before identifier 'dr'
1>c:\program files\opencv\otherlibs\highgui\highgui.h(402) : error C2065: 'dr' : undeclared identifier
1>c:\program files\opencv\otherlibs\highgui\highgui.h(403) : error C2065: 'dr' : undeclared identifier
1>c:\program files\opencv\otherlibs\highgui\highgui.h(403) : error C2228: left of '.left' must have class/struct/union
1> type is ''unknown-type''
1>c:\program files\opencv\otherlibs\highgui\highgui.h(404) : error C2065: 'dr' : undeclared identifier
1>c:\program files\opencv\otherlibs\highgui\highgui.h(404) : error C2228: left of '.top' must have class/struct/union
1> type is ''unknown-type''
1>c:\program files\opencv\otherlibs\highgui\highgui.h(405) : error C2065: 'dr' : undeclared identifier
1>c:\program files\opencv\otherlibs\highgui\highgui.h(405) : error C2228: left of '.right' must have class/struct/union
1> type is ''unknown-type''
1>c:\program files\opencv\otherlibs\highgui\highgui.h(406) : error C2065: 'dr' : undeclared identifier
1>c:\program files\opencv\otherlibs\highgui\highgui.h(406) : error C2228: left of '.bottom' must have class/struct/union
1> type is ''unknown-type''
1>c:\program files\opencv\otherlibs\highgui\highgui.h(408) : error C2065: 'dr' : undeclared identifier
1>c:\program files\opencv\otherlibs\highgui\highgui.h(411) : error C2146: syntax error : missing ')' before identifier 'r'
1>c:\program files\opencv\otherlibs\highgui\highgui.h(411) : error C2433: 'RectToROI' : 'inline' not permitted on data declarations
1>c:\program files\opencv\otherlibs\highgui\highgui.h(411) : error C2440: 'initializing' : cannot convert from 'int' to 'IplROI'
1> No constructor could take the source type, or constructor overload resolution was ambiguous
1>c:\program files\opencv\otherlibs\highgui\highgui.h(411) : error C2059: syntax error : ')'
1>c:\program files\opencv\otherlibs\highgui\highgui.h(412) : error C2146: syntax error : missing ')' before identifier 'r'
1>c:\program files\opencv\otherlibs\highgui\highgui.h(412) : error C2433: 'RectToROI' : 'inline' not permitted on data declarations
1>c:\program files\opencv\otherlibs\highgui\highgui.h(412) : error C2374: 'RectToROI' : redefinition; multiple initialization
1> c:\program files\opencv\otherlibs\highgui\highgui.h(411) : see declaration of 'RectToROI'
1>c:\program files\opencv\otherlibs\highgui\highgui.h(412) : error C2440: 'initializing' : cannot convert from 'int' to 'IplROI'
1> No constructor could take the source type, or constructor overload resolution was ambiguous
1>c:\program files\opencv\otherlibs\highgui\highgui.h(412) : error C2059: syntax error : ')'
1>c:\program files\opencv\otherlibs\highgui\highgui.h(413) : error C2143: syntax error : missing ';' before '{'
1>c:\program files\opencv\otherlibs\highgui\highgui.h(413) : error C2447: '{' : missing function header (old-style formal list?)
1>c:\program files\opencv\otherlibs\highgui\highgui.h(455) : error C2061: syntax error : identifier 'RECT'
1>c:\program files\opencv\otherlibs\highgui\highgui.h(484) : error C2061: syntax error : identifier 'HDC'
1>c:\program files\opencv\otherlibs\highgui\highgui.h(487) : error C2061: syntax error : identifier 'HDC'
1>c:\program files\opencv\otherlibs\highgui\highgui.h(458) : error C2065: 'r' : undeclared identifier
1>c:\program files\opencv\otherlibs\highgui\highgui.h(458) : error C2228: left of '.left' must have class/struct/union
1> type is ''unknown-type''
1>c:\program files\opencv\otherlibs\highgui\highgui.h(458) : error C2065: 'r' : undeclared identifier
1>c:\program files\opencv\otherlibs\highgui\highgui.h(458) : error C2228: left of '.top' must have class/struct/union
1> type is ''unknown-type''
1>c:\program files\opencv\otherlibs\highgui\highgui.h(458) : error C2065: 'r' : undeclared identifier
1>c:\program files\opencv\otherlibs\highgui\highgui.h(458) : error C2228: left of '.right' must have class/struct/union
1> type is ''unknown-type''
1>c:\program files\opencv\otherlibs\highgui\highgui.h(458) : error C2065: 'r' : undeclared identifier
1>c:\program files\opencv\otherlibs\highgui\highgui.h(458) : error C2228: left of '.left' must have class/struct/union
1> type is ''unknown-type''
1>c:\program files\opencv\otherlibs\highgui\highgui.h(458) : error C2065: 'r' : undeclared identifier
1>c:\program files\opencv\otherlibs\highgui\highgui.h(458) : error C2228: left of '.bottom' must have class/struct/union
1> type is ''unknown-type''
1>c:\program files\opencv\otherlibs\highgui\highgui.h(458) : error C2065: 'r' : undeclared identifier
1>c:\program files\opencv\otherlibs\highgui\highgui.h(458) : error C2228: left of '.top' must have class/struct/union
1> type is ''unknown-type''
1>premier_test - 87 error(s), 2 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped =========
que dois je faire?
Merci pour votre aide
Partager