mardi, 26 décembre 2006

Programmation : problème avec la musique MIDI - Claude - 15.02.04

Est-ce qu'un programmeur C++ pourrait m'expliquer comment remédier à ce genre de message d'erreur (sachant que le moteur du jeu qui n'est pas totalement de moi est normalement fonctionnel) :

  • Compiling resources...
  • Compiling...
  • Bitmap.cpp
  • GameEngine.cpp
  • c:\program files\microsoft visual studio\myprojects\ébauche\gameengine.cpp(423) : error C2065: 'DWORD_PTR' : undeclared identifier
  • c:\program files\microsoft visual studio\myprojects\ébauche\gameengine.cpp(423) : error C2677: binary '&' : no global operator defined which takes type 'struct tagMCI_OPEN_PARMSA' (or there is no acceptable conversion)
  • c:\program files\microsoft visual studio\myprojects\ébauche\gameengine.cpp(436) : error C2677: binary '&' : no global operator defined which takes type 'struct tagMCI_SEEK_PARMS' (or there is no acceptable conversion)
  • c:\program files\microsoft visual studio\myprojects\ébauche\gameengine.cpp(444) : error C2677: binary '&' : no global operator defined which takes type 'struct tagMCI_PLAY_PARMS' (or there is no acceptable conversion)

Merci beaucoup !


Mohammed - 17.02.04

Tu ne dois pas être programmeur, à voir ta question.
Il te manque des définitions, il doit te manquer un fichier header.


Philippe - 17.02.04

#include <windows.h>


Claude (auteur) - 18.02.04

Ce fichier est bien inclus, heureusement !

Le problème vient forcément d'ailleurs, mais il est vrai que mes connaissance en C++ ne sont pas très développées.


JMM - 19.02.04

Peut-être #include <mmsystem.h>


Kcm - 19.02.04

C’est simple : c’est la déclaration de 'DWORD_PTR' qu’il trouve pas.

Bon, bah, tu cherches le .h ou .cpp qui le déclare

Typedef … DWORD_PTR

Et tu inclus ce fichier (fais une recherche Windows avecnom de fichier : *.h, et mot dans le fichier : DWORD_PTR)

PS : Ca doit être un truc du genre :

typedef _W64 unsigned long ULONG_PTR
typedef ULONG_PTR DWORD_PTR


Encore1Ben - 19.02.04

A première vue, je dirais qu'il te manque des librairies et des bibliothèques. As-tu fais référence correctement à toutes les librairies qu'utilisent le moteur ? Regarde du côté du MCI.


Henry - 09.04.04

I think you have had the same problem from the same book we are both probably studying. However I have found a solution to the problem.

Include this at the top of GameEngine.h ( This was sourced from this site )

#define DWORD_PTR DWORD

The problem should now have fixed itself.

P.S.: Sorry about not responding in French. I had to translate to understand that you were having the same problem as me.

 

[Répondre] [Voir tous les sujets du forum]