所以,我最近在 ubuntu 32 位上做了一个项目,使用 SDL 库。但我想使用 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。
有什么帮助吗?:E
它适用于该死的 32b ubuntu ..