PDA

View Full Version : SDL - Audio and QT Creator Sound



hakermania
30th August 2010, 23:21
I am trying to load and play once a .ogg file with SDL. This is the code:

#include <SDL/SDL.h>
#include <SDL/SDL_mixer.h>
int main()
{
Mix_Music *music = NULL;
music = Mix_LoadMUS("music.ogg");
Mix_PlayMusic(music, 0);
}
It doesn't work, it says collect2:ld returned 1 exit status
I would very happy ig somebody could fix it for me becauz i've searched the whole web for finding a simple example of opening a playing a file with SDL, but I would always ask if there is any Qt library for playing audio files...:confused: