[1] Comentário enviado por
quartodazona em 29/06/2010 - 21:38h:
Olá amigo.
Linda iniciativa, mas o código não compila. Consegui reduzir o número de erros com a inclusão de stdlib, stdio e string.h no cabeçalho, mas isto não resolveu o problema. Não está claro também se tenho que instalar alguma biblioteca a parte.
Segue abaixo o código dos erros:
teste.c:1:21: error: SDL/SDL.h: Arquivo ou diretório não encontrado
teste.c:2:27: error: SDL/SDL_mixer.h: Arquivo ou diretório não encontrado
teste.c:7: error: conflicting types for ‘argv’
teste.c:7: note: previous definition of ‘argv’ was here
teste.c: In function ‘main’:
teste.c:10: warning: implicit declaration of function ‘SDL_Init’
teste.c:10: error: ‘SDL_INIT_VIDEO’ undeclared (first use in this function)
teste.c:10: error: (Each undeclared identifier is reported only once
teste.c:10: error: for each function it appears in.)
teste.c:10: error: ‘SDL_INIT_AUDIO’ undeclared (first use in this function)
teste.c:11: warning: implicit declaration of function ‘SDL_GetError’
teste.c:11: warning: format ‘%s’ expects type ‘char *’, but argument 3 has type ‘int’
teste.c:18: error: ‘Uint16’ undeclared (first use in this function)
teste.c:18: error: expected ‘;’ before ‘audio_format’
teste.c:23: warning: implicit declaration of function ‘Mix_OpenAudio’
teste.c:23: error: ‘audio_format’ undeclared (first use in this function)
teste.c:24: warning: implicit declaration of function ‘Mix_GetError’
teste.c:24: warning: format ‘%s’ expects type ‘char *’, but argument 3 has type ‘int’
teste.c:29: error: ‘Mix_Chunk’ undeclared (first use in this function)
teste.c:29: error: ‘sound’ undeclared (first use in this function)
teste.c:31: warning: implicit declaration of function ‘Mix_LoadWAV’
teste.c:33: warning: format ‘%s’ expects type ‘char *’, but argument 3 has type ‘int’
teste.c:37: error: ‘SDL_Surface’ undeclared (first use in this function)
teste.c:37: error: ‘screen’ undeclared (first use in this function)
teste.c:38: warning: implicit declaration of function ‘SDL_SetVideoMode’
teste.c:38: error: ‘SDL_ANYFORMAT’ undeclared (first use in this function)
teste.c:40: warning: too many arguments for format
teste.c:45: warning: implicit declaration of function ‘Mix_PlayChannel’
teste.c:47: warning: format ‘%s’ expects type ‘char *’, but argument 3 has type ‘int’
teste.c:51: warning: implicit declaration of function ‘Mix_Playing’
teste.c:53: warning: implicit declaration of function ‘Mix_FreeChunk’
teste.c:55: warning: implicit declaration of function ‘Mix_CloseAUdio’
teste.c:57: warning: implicit declaration of function ‘SDL_Quit’
Eu gostaria muito de que este programa funcionasse.