Hey, guys,
I’m really a new hand to SDL and eager to make something with this amazing
library.
Now I’m going to port SDL into a new platform. But when I was trying to
compile SDL in an IDE-style like what is said in README.Porting, which is
compile with all source files. I found many link errors like
peiyun at Peiyun-Linux:sdl_try$ make sdl_link
gcc -Isdl_include/ sdl_lib/*.o code/init.c -o sdl_init
sdl_lib/SDL.o: In functionSDL_InitSubSystem': SDL.c:(.text+0x17): undefined reference to
SDL_StartTicks’
sdl_lib/SDL_audio.o: In functionSDL_RunAudio': SDL_audio.c:(.text+0x23d): undefined reference to
SDL_Delay’
sdl_lib/SDL_audio.o:(.data+0x0): undefined reference toPULSE_bootstrap' sdl_lib/SDL_audio.o:(.data+0x8): undefined reference to
ALSA_bootstrap’
sdl_lib/SDL_audio.o:(.data+0x10): undefined reference toDSP_bootstrap' sdl_lib/SDL_audio.o:(.data+0x18): undefined reference to
DMA_bootstrap’
sdl_lib/SDL_audio.o:(.data+0x28): undefined reference to
DUMMYAUD_bootstrap' sdl_lib/SDL_cdrom.o: In function
SDL_CDROMInit’:
SDL_cdrom.c:(.text+0x13): undefined reference toSDL_SYS_CDInit' sdl_lib/SDL_cdrom.o: In function
SDL_CDROMQuit’:
SDL_cdrom.c:(.text+0x774): undefined reference toSDL_SYS_CDQuit' sdl_lib/SDL_diskaudio.o: In function
DISKAUD_WaitAudio’:
SDL_diskaudio.c:(.text+0x1ea): undefined reference toSDL_Delay' sdl_lib/SDL_events.o: In function
SDL_Lock_EventThread’:
SDL_events.c:(.text+0x36): undefined reference toSDL_Delay' sdl_lib/SDL_events.o: In function
SDL_GobbleEvents’:
SDL_events.c:(.text+0x106): undefined reference toSDL_Delay' sdl_lib/SDL_events.o: In function
SDL_WaitEvent’:
SDL_events.c:(.text+0x8dd): undefined reference toSDL_Delay' sdl_lib/SDL_gamma.o: In function
CalculateGammaRamp’:
SDL_gamma.c:(.text+0xd6): undefined reference topow' sdl_lib/SDL_gamma.o: In function
CalculateGammaFromRamp’:
SDL_gamma.c:(.text+0x1ee): undefined reference tolog' SDL_gamma.c:(.text+0x205): undefined reference to
log’
sdl_lib/SDL_joystick.o: In functionSDL_JoystickInit': SDL_joystick.c:(.text+0x10): undefined reference to
SDL_SYS_JoystickInit’
sdl_lib/SDL_joystick.o: In functionSDL_JoystickName': SDL_joystick.c:(.text+0xef): undefined reference to
SDL_SYS_JoystickName’
sdl_lib/SDL_joystick.o: In functionSDL_JoystickOpen': SDL_joystick.c:(.text+0x20c): undefined reference to
SDL_SYS_JoystickOpen’
sdl_lib/SDL_joystick.o: In function `SDL_JoystickClose’:
I thought I did not compile the source files in a correct way. So is there
anyone could tell me how to do it right?
Many thanks!
Best,
Peiyun–
Peiyun Hu ???
Department of Computer Science and Technology, Tsinghua University
Beijing, P.R.China
Zip Code: 100084