I’m trying to compile SDL_image and link it against an SDL other than the one
already installed on my system. I built SDL without a problem against uClibc.
I’m configuring SDL_image as so:
env CPPFLAGS="-I/home/jbodnar/projects/mp3/build/libpng-1.2.3
-I/home/jbodnar/projects/mp3/build/zlib-1.1.3 -I/home/jbodnar/projects/mp3/b
uild/SDL-1.2.4/include"
LDFLAGS="-L/home/jbodnar/projects/mp3/filesystem/lib
-L/home/jbodnar/projects/mp3/filesystem/usr/lib"
PATH=/home/jbodnar/projects/mp3/build/i386-linux-uclibc/usr/bin:$PATH
./configure
–prefix=/home/jbodnar/projects/mp3/filesystem/usr
–enable-static=no
–with-sdl-prefix=/home/jbodnar/projects/mp3/build/SDL-1.2.4/src/.libs
–with-sdl-exec-prefix=/home/jbodnar/projects/mp3/build/SDL-1.2.4/
–disable-sdltest
–enable-jpg=no
when I try to compile SDL_image I get the following errors:
gcc -g -O2 -DLOAD_BMP -DLOAD_GIF -DLOAD_LBM -DLOAD_PCX -DLOAD_PNG -DLOAD_PNM
-DLOAD_TGA -DLOAD_XPM -L/home/jbodnar/projects/mp3/filesystem/lib
-L/home/jbodnar/projects/mp3/filesystem/usr/lib -o .libs/showimage showimage.o
.libs/libSDL_image.so -lpng -lz -Wl,–rpath
-Wl,/home/jbodnar/projects/mp3/filesystem/usr/lib
/usr/bin/ld: warning: libc.so.6, needed by
/usr/lib/gcc-lib/i586-mandrake-linux-gnu/2.96/…/…/…/libpng.so, may conflict
with libc.so.0
showimage.o: In function draw_background': /home/jbodnar/projects/mp3/build/SDL_image-1.2.2/showimage.c:46: undefined reference to
SDL_MapRGB’
/home/jbodnar/projects/mp3/build/SDL_image-1.2.2/showimage.c:47: undefined
reference to SDL_MapRGB' showimage.o: In function
main’:
/home/jbodnar/projects/mp3/build/SDL_image-1.2.2/showimage.c:93: undefined
reference to SDL_Init' /home/jbodnar/projects/mp3/build/SDL_image-1.2.2/showimage.c:94: undefined reference to
SDL_GetError’
/home/jbodnar/projects/mp3/build/SDL_image-1.2.2/showimage.c:101: undefined
reference to SDL_ShowCursor' /home/jbodnar/projects/mp3/build/SDL_image-1.2.2/showimage.c:112: undefined reference to
SDL_GetError’
/home/jbodnar/projects/mp3/build/SDL_image-1.2.2/showimage.c:116: undefined
reference to SDL_WM_SetCaption' /home/jbodnar/projects/mp3/build/SDL_image-1.2.2/showimage.c:119: undefined reference to
SDL_VideoModeOK’
/home/jbodnar/projects/mp3/build/SDL_image-1.2.2/showimage.c:134: undefined
reference to SDL_SetVideoMode' /home/jbodnar/projects/mp3/build/SDL_image-1.2.2/showimage.c:136: undefined reference to
SDL_GetError’
/home/jbodnar/projects/mp3/build/SDL_image-1.2.2/showimage.c:143: undefined
reference to SDL_SetColors' /home/jbodnar/projects/mp3/build/SDL_image-1.2.2/showimage.c:152: undefined reference to
SDL_UpperBlit’
/home/jbodnar/projects/mp3/build/SDL_image-1.2.2/showimage.c:153: undefined
reference to SDL_UpdateRect' /home/jbodnar/projects/mp3/build/SDL_image-1.2.2/showimage.c:157: undefined reference to
SDL_PollEvent’
/home/jbodnar/projects/mp3/build/SDL_image-1.2.2/showimage.c:195: undefined
reference to SDL_Delay' /home/jbodnar/projects/mp3/build/SDL_image-1.2.2/showimage.c:198: undefined reference to
SDL_FreeSurface’
/home/jbodnar/projects/mp3/build/SDL_image-1.2.2/showimage.c:202: undefined
reference to SDL_Quit' .libs/libSDL_image.so: undefined reference to
SDL_LoadBMP_RW’
.libs/libSDL_image.so: undefined reference to SDL_RWFromFile' .libs/libSDL_image.so: undefined reference to
SDL_SetColorKey’
.libs/libSDL_image.so: undefined reference to SDL_CreateRGBSurface' .libs/libSDL_image.so: undefined reference to
SDL_SetError’
collect2: ld returned 1 exit status
make: *** [showimage] Error 1
It appears that the build process can’t find my alternative SDL for both
showimage and libSDL_image.so.–
Jason Bodnar
@Jason_Bodnar
http://www.shakabuku.org