[英]Unable to compile SDL in linux
我在ubuntu終端中使用以下代碼來編譯我的sdl代碼:
g++ SDL.cpp -o a.out -lsdl -lsdl_gfx
我得到這個錯誤:
/usr/bin/ld: cannot find -lsdl
/usr/bin/ld: cannot find -lsdl_gfx
collect2: ld returned 1 exit status
知道這意味着什么嗎?
g++ SDL.cpp -I/usr/include/SDL -lSDLmain -lSDL_gfx -lSDL
確保已安裝SDL_gfx,因為它是一個單獨的可選模塊。
我相信這可以做到:
g++ SDL.cpp -o a.out -lSDL_gfx
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.