缺少SDL库?

时间:2013-05-15 11:11:50

标签: ubuntu dll linker sdl

所以,我最近使用SDL库在ubuntu 32位上创建了一个项目。但是我想使用RAX等寄存器,所以我安装了64位,但是我收到了关于丢失SDL的错误。

错误:

artur@ubuntu:~/Desktop$ gcc -g -Wall `sdl-config --cflags` `sdl-config --libs` -lSDL_image -lSDL -lSDLmain -msse2 -o mmx mmx.c
/tmp/ccCicye2.o: In function `Load_image':
/home/artur/Desktop/mmx.c:104: undefined reference to `IMG_Load'
/home/artur/Desktop/mmx.c:106: undefined reference to `SDL_GetError'
/tmp/ccCicye2.o: In function `Paint':
/home/artur/Desktop/mmx.c:115: undefined reference to `SDL_UpperBlit'
/home/artur/Desktop/mmx.c:116: undefined reference to `SDL_UpdateRect'
/tmp/ccCicye2.o: In function `main':
/home/artur/Desktop/mmx.c:142: undefined reference to `SDL_Init'
/home/artur/Desktop/mmx.c:143: undefined reference to `SDL_GetError'
/home/artur/Desktop/mmx.c:154: undefined reference to `SDL_WM_SetCaption'
/home/artur/Desktop/mmx.c:157: undefined reference to `SDL_VideoModeOK'
/home/artur/Desktop/mmx.c:172: undefined reference to `SDL_SetVideoMode'
/home/artur/Desktop/mmx.c:174: undefined reference to `SDL_GetError'
/home/artur/Desktop/mmx.c:180: undefined reference to `SDL_SetColors'
/home/artur/Desktop/mmx.c:192: undefined reference to `SDL_PollEvent'
/home/artur/Desktop/mmx.c:203: undefined reference to `SDL_LockSurface'
/home/artur/Desktop/mmx.c:209: undefined reference to `SDL_UnlockSurface'
/home/artur/Desktop/mmx.c:238: undefined reference to `SDL_RWFromFile'
/home/artur/Desktop/mmx.c:238: undefined reference to `SDL_SaveBMP_RW'
/home/artur/Desktop/mmx.c:254: undefined reference to `SDL_Delay'
/home/artur/Desktop/mmx.c:257: undefined reference to `SDL_FreeSurface'
/home/artur/Desktop/mmx.c:259: undefined reference to `SDL_Quit'
collect2: error: ld returned 1 exit status

我安装了SDL,在usr / include下的SDL目录中获得了SDLimage.h和SDL.h。

有任何帮助吗? :电子

它适用于该死的32b ubuntu ..

1 个答案:

答案 0 :(得分:0)

期权订单很重要。试试这个:

gcc -g -Wall mmx.c -o mmx `sdl-config --cflags` `sdl-config --libs` -lSDL_image -msse2