Hello,
I’m in the process of creating a class for my game, and I was adding sound support for it with SDL_Mixer, but when I try to compile,
I get a few undefined-reference errors (for all the Mixer functions I used). Is their an object file, or sdl-config thing that I’m supposed
to link with?
Thanks,
Cameron Matheson
Cameron Matheson wrote:
I’m in the process of creating a class for my game, and I was adding
sound support for it with SDL_Mixer, but when I try to compile,I get a
few undefined-reference errors (for all the Mixer functions I used).
Is their an object file, or sdl-config thing that I’m supposedto link
with?
giving sdl-config --libs
to the linker should setup the the proper -L
(which points the compiler to the directory of the library) and then
adding -lSDL_mixer tells the compiler to load it.
I don’t know how much of that makes sense… But essencially just add
this to what ever is already passed to the linker:
sdl-config --libs
-lSDL_mixer
--David Snopek
Thanks,
I added that '-lSDL_mixer to my Makefile and now everything works perfecty.
Thanks again,
Cameron matheson> ----- Original Message -----
From: xevol@execpc.com (David Snopek)
To:
Sent: Saturday, December 30, 2000 9:48 AM
Subject: Re: [SDL] can’t compile programs using SDL_Mixer Library
Cameron Matheson wrote:
I’m in the process of creating a class for my game, and I was adding
sound support for it with SDL_Mixer, but when I try to compile,I get a
few undefined-reference errors (for all the Mixer functions I used).
Is their an object file, or sdl-config thing that I’m supposedto link
with?
giving sdl-config --libs
to the linker should setup the the proper -L
(which points the compiler to the directory of the library) and then
adding -lSDL_mixer tells the compiler to load it.
I don’t know how much of that makes sense… But essencially just add
this to what ever is already passed to the linker:
sdl-config --libs
-lSDL_mixer
--David Snopek