I'm learning SDL right now, and I want to play an MP3 file with SDL_mixer
, so I installed it, but when I compile my program I get "undefined reference" errors for every SDL mixer function I use.
Here is my compile command:
g++ Player.cpp -o Player -L/opt/lib -I/usr/include/SDL -D_GNU_SOURCE=1 -D_REENTRANT -lSDL `pkg-config gtkmm-3.0 --cflags --libs`
If I add -lSDL_mixe
to this, it reports that it cannot find it.