开发者

Unable to compile SDL in linux

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
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜