Error LNK2005 problème de lien avec multuple définition

Résolu
cs_chamoine Messages postés 8 Date d'inscription lundi 28 février 2005 Statut Membre Dernière intervention 1 juin 2005 - 1 juin 2005 à 21:06
cs_chamoine Messages postés 8 Date d'inscription lundi 28 février 2005 Statut Membre Dernière intervention 1 juin 2005 - 1 juin 2005 à 22:16
Pour faire cour voici le message d'erreur:

strmiids.lib(strmiids.obj) : error LNK2005: _IID_IDirectDrawColorControl already defined in GameMachine.obj

strmiids.lib(strmiids.obj) : error LNK2005: _IID_IDirectDrawClipper already defined in GameMachine.obj

strmiids.lib(strmiids.obj) : error LNK2005: _IID_IDirectDrawPalette already defined in GameMachine.obj

strmiids.lib(strmiids.obj) : error LNK2005: _IID_IDirectDrawSurface7 already defined in GameMachine.obj

strmiids.lib(strmiids.obj) : error LNK2005: _IID_IDirectDrawSurface4 already defined in GameMachine.obj

strmiids.lib(strmiids.obj) : error LNK2005: _IID_IDirectDrawSurface3 already defined in GameMachine.obj

strmiids.lib(strmiids.obj) : error LNK2005: _IID_IDirectDrawSurface2 already defined in GameMachine.obj

strmiids.lib(strmiids.obj) : error LNK2005: _IID_IDirectDrawSurface already defined in GameMachine.obj

strmiids.lib(strmiids.obj) : error LNK2005: _IID_IDirectDraw2 already defined in GameMachine.obj

strmiids.lib(strmiids.obj) : error LNK2005: _IID_IDirectDraw already defined in GameMachine.obj

strmiids.lib(strmiids.obj) : error LNK2005: _CLSID_DirectDrawClipper already defined in GameMachine.obj

strmiids.lib(strmiids.obj) : error LNK2005: _CLSID_DirectDraw already defined in GameMachine.obj

Debug/GameMachine.exe : fatal error LNK1169: one or more multiply defined symbols found



J'ai cherché un peu partout une solution mais rien n'a été efficasse pour cet erreur précise!!!

Si vous avez une idée

Pour
préciser j'utilise visual c++ sur winXP, le but de mon code étant de
visualiser un fichier avi mais apprement j'ai un problème entre ddraw
et dshow



voili voilou

3 réponses

cs_chamoine Messages postés 8 Date d'inscription lundi 28 février 2005 Statut Membre Dernière intervention 1 juin 2005
1 juin 2005 à 22:16
Ayé j'ai trouver mon problème le voici

#define INITGUID

Bon sa parait pas comme sa mais bon

Enfaite je les virés puis j'ai inclu dxguid.lib et maintenant j'ai plus aucun problème!!!

Mort de rire sa fait la 2ème fois que je post un truc puis je trouve la soluce après.



Enfin merci a toi cosmobob (quans même ta fait l'effort de lire)
3
cs_chamoine Messages postés 8 Date d'inscription lundi 28 février 2005 Statut Membre Dernière intervention 1 juin 2005
1 juin 2005 à 21:12
Petite précision j'ai bien mis:

#ifndef NomFichier_H

#define NomFichier_H

//le code

#endif



j'ai vérifié l'ordre de mes inclusions... Donc pas le peine de me le dire
0
cosmobob Messages postés 700 Date d'inscription mardi 30 décembre 2003 Statut Membre Dernière intervention 27 janvier 2009 4
1 juin 2005 à 21:49
salut,

Combien y a t'il de projets dans ton espace de travail (le workspace
sous vc6) ? un seul exe, ou bien un exe avec une lib; ou bien un
exe avec une DLL, ... ?

quels sont les fichiers include de GameMachine.cpp ?

"apprement j'ai un problème entre ddraw et dshow"

-> essaie de n'inclure qu'une seule de ces deux lib dans les options du linker de ton projet



a+
0
Rejoignez-nous