Bonsoir à tous,
Je n'arrive pas à compiler un code SDL pour tester le fonctinnement de cette librairie sous Dev-C++;
apres tentative de compilation, j'obtiens les message d'erreurs suivants:
3 D:\Cyril\Dev-Cpp\Untitled1.c SDL.h: No such file or directory.
D:\Cyril\Dev-Cpp\Untitled1.c In function `main':
11 D:\Cyril\Dev-Cpp\Untitled1.c `SDL_INIT_VIDEO' undeclared (first use in this function)
(Each undeclared identifier is reported only once
for each function it appears in.)
11 D:\Cyril\Dev-Cpp\Untitled1.c `SDL_INIT_AUDIO' undeclared (first use in this function)
D:\Cyril\Dev-Cpp\Makefile.win [Build Error] [Untitled1.o] Error 1 .
le programme que j'ai essayé de compiler est un exemple tirer du doc de la SDL. le voici en dessous:
pouvez vous m'aider ?
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25 #include "SDL.h" /* All SDL App's need this */ #include <stdio.h> int main(int argc, char *argv[]) { printf("Initializing SDL.\n"); /* Initialize defaults, Video and Audio */ if((SDL_Init(SDL_INIT_VIDEO|SDL_INIT_AUDIO)==-1)) { printf("Could not initialize SDL: %s.\n", SDL_GetError()); exit(-1); } printf("SDL initialized.\n"); printf("Quiting SDL.\n"); /* Shutdown all subsystems */ SDL_Quit(); printf("Quiting....\n"); exit(0); }
Partager