IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)
Navigation

Inscrivez-vous gratuitement
pour pouvoir participer, suivre les réponses en temps réel, voter pour les messages, poser vos propres questions et recevoir la newsletter

OpenCV Discussion :

Erreur de compilation avec OpenCV 1.1, Visual Studio 2008 et Vista


Sujet :

OpenCV

  1. #1
    Futur Membre du Club
    Inscrit en
    Décembre 2008
    Messages
    6
    Détails du profil
    Informations forums :
    Inscription : Décembre 2008
    Messages : 6
    Points : 5
    Points
    5
    Par défaut Erreur de compilation avec OpenCV 1.1, Visual Studio 2008 et Vista
    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

  2. #2
    Membre éprouvé
    Homme Profil pro
    Ingénieur 3D
    Inscrit en
    Avril 2008
    Messages
    400
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : Royaume-Uni

    Informations professionnelles :
    Activité : Ingénieur 3D

    Informations forums :
    Inscription : Avril 2008
    Messages : 400
    Points : 968
    Points
    968
    Par défaut
    Essaye d'inclure windows.h

  3. #3
    Futur Membre du Club
    Inscrit en
    Décembre 2008
    Messages
    6
    Détails du profil
    Informations forums :
    Inscription : Décembre 2008
    Messages : 6
    Points : 5
    Points
    5
    Par défaut
    j'ai crée un fichier fictif windows.h et j'ai compilé mais tjrs le meme probleme
    je bloque !!!

  4. #4
    Membre éprouvé
    Homme Profil pro
    Ingénieur 3D
    Inscrit en
    Avril 2008
    Messages
    400
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : Royaume-Uni

    Informations professionnelles :
    Activité : Ingénieur 3D

    Informations forums :
    Inscription : Avril 2008
    Messages : 400
    Points : 968
    Points
    968
    Par défaut
    Heu non, il faut pas créer de fichier windows.h, juste l'inclure avant d'inclure highgui.h (c'est un fichier qui existe déjà et est fourni par le compilateur). Mais franchement, pourquoi utiliser opencv 1.1 ? C'est vraiment chercher les emmerdes que de commencer avec une vieille version qui n'est plus supportée.

  5. #5
    Futur Membre du Club
    Inscrit en
    Décembre 2008
    Messages
    6
    Détails du profil
    Informations forums :
    Inscription : Décembre 2008
    Messages : 6
    Points : 5
    Points
    5
    Par défaut
    bein j'avais lu ça sur internet !!!!!
    c'est bon j'ai résolu le problème en enlevant ce windows.h
    merci pour votre aide

+ Répondre à la discussion
Cette discussion est résolue.

Discussions similaires

  1. Transfert FTP avec un PDA en Visual studio 2008
    Par Didier L dans le forum VB.NET
    Réponses: 2
    Dernier message: 06/11/2012, 13h50
  2. Compilation avec deux versions de visual studio
    Par 77Gigi dans le forum Visual C++
    Réponses: 2
    Dernier message: 18/07/2011, 10h17
  3. Visual Studio 2008 et Vista 64 Bits
    Par DotNET74 dans le forum Visual Studio
    Réponses: 8
    Dernier message: 22/11/2009, 15h35
  4. RS232 avec Windows Form sous Visual Studio 2008
    Par Jerepain dans le forum Visual C++
    Réponses: 8
    Dernier message: 14/05/2009, 18h02

Partager

Partager
  • Envoyer la discussion sur Viadeo
  • Envoyer la discussion sur Twitter
  • Envoyer la discussion sur Google
  • Envoyer la discussion sur Facebook
  • Envoyer la discussion sur Digg
  • Envoyer la discussion sur Delicious
  • Envoyer la discussion sur MySpace
  • Envoyer la discussion sur Yahoo