Programmation joystick

MadNomad53 Messages postés 6 Date d'inscription mardi 29 avril 2003 Statut Membre Dernière intervention 2 juin 2003 - 2 juin 2003 à 16:55
MadNomad53 Messages postés 6 Date d'inscription mardi 29 avril 2003 Statut Membre Dernière intervention 2 juin 2003 - 2 juin 2003 à 17:18
J'ai un probleme de linkage avec ce programme:
voici le source:

#include <windows.h>
#include <stdio.h> // pour printf
#include <mmsystem.h> // pour les fonctions du joystick

void main()
{
int i;
joyinfoex_tag structtmp;

printf("Voici la liste des joysticks connectés :\n");
for (i = JOYSTICKID1 ; i < (JOYSTICKID1 + 16) ; i++)
{
if (joyGetPosEx(i,&structtmp) == JOYERR_NOERROR)
{
printf("%d\n",i);
}
}
}

et voici l'erreur:
Joystick.obj : error LNK2001: unresolved external symbol __imp__joyGetPosEx@8
Debug/Joystick.exe : fatal error LNK1120: 1 unresolved externals

je travaille sous vc++ 5.0
merci de m'aider :)

4 réponses

BruNews Messages postés 21040 Date d'inscription jeudi 23 janvier 2003 Statut Modérateur Dernière intervention 21 août 2019
2 juin 2003 à 16:59
et le linker ???????????????????
Winmm.lib
BruNews, ciao...
0
MadNomad53 Messages postés 6 Date d'inscription mardi 29 avril 2003 Statut Membre Dernière intervention 2 juin 2003
2 juin 2003 à 17:10
comment ca marche ca ?
0
BruNews Messages postés 21040 Date d'inscription jeudi 23 janvier 2003 Statut Modérateur Dernière intervention 21 août 2019
2 juin 2003 à 17:15
Dans options du projet, onglet linker et tu ajoutes en dependance supplementaire.
BruNews, ciao...
0
MadNomad53 Messages postés 6 Date d'inscription mardi 29 avril 2003 Statut Membre Dernière intervention 2 juin 2003
2 juin 2003 à 17:18
merci c cool, ca marche. En plus j'ai appris un truc
merci :)
0
Rejoignez-nous