如果有 include sdl.h sdl_image.h sdl_mixer.h 三個的話
確認SDL 是否有安裝正確 , if yes , it will exist /usr/include/SDL directory
step 1 : compiler .c to .o
gcc –c hello.c –I /usr/include/SDL
step 2 : link .o to binary file
gcc –g –O2 –o hello –lSDL –lSDL_image –lSDL_mixer *.o
description :
step 1 :
-c mesns just compile not link
-I means add header search directories
step 2:
-l mesns add lib (if SDL installed correctly)
全站熱搜
留言列表