I went to compile a project of mine, which uses SDL, SDL_ttf, OpenAL, and GTK. All of which are outputting errors like the following:
TxtFunc.cpp:(.text+0x61
Generally you need to have your -l options after the files that use the symbols on the command line. Perhaps try moving the sdl-config --libs --cflags
to the end of the command? i.e. for your test program:
g++ -o sdl-test ./sdl-test.cpp `sdl-config --libs --cflags`
Gah, which pillock got the idea to change the compiler to rely now on the order of options in the command line?
Well,that fixed my problem too, just moved ($CFLAGS) after ($OBJS) in my Makefile and all my linking problems with unknown references to SDL libs are gone >.<
In case you use SDL_ttf, you need to
g++ main.cpp -o sdl-test `sdl-config --libs --cflags` -lSDL_ttf