I use the following code in the ubuntu terminal to compile my sdl code:
g++ SDL.cpp -o a.out -lsdl -lsdl_gfx
and i get this error:
/usr开发者_开发百科/bin/ld: cannot find -lsdl
/usr/bin/ld: cannot find -lsdl_gfx
collect2: ld returned 1 exit status
Any idea what this means?
g++ SDL.cpp -I/usr/include/SDL -lSDLmain -lSDL_gfx -lSDL
Make sure you have SDL_gfx installed as it is a separate optional module.
I believe this will do it:
g++ SDL.cpp -o a.out -lSDL_gfx
精彩评论