SDL linking problems

Hi. I got problems linking towards SDL while building.
Here’s the information requested by the FAQ:

$ which sdl-config
/usr/local/bin/sdl-config

$ sdl-config --version
1.2.7

$ locate libSDL
/opt/SDL/lib/libSDL-1.2.so.0
/opt/SDL/lib/libSDL-1.2.so.0.7.0
/opt/SDL/lib/libSDL.a
/opt/SDL/lib/libSDL_image.a
/opt/SDL/lib/libSDL_image.la
/opt/SDL/lib/libSDL.la
/opt/SDL/lib/libSDLmain.a
/opt/SDL/lib/libSDL_mixer.a
/opt/SDL/lib/libSDL_mixer.la
/opt/SDL/lib/libSDL.so
/opt/SDL/lib/libSDL_ttf.a
/opt/SDL/lib/libSDL_ttf.la

As you can see my SDL is in a nonstandard prefix.
/usr/local/sdl-config is a symlink to
/opt/SDL/bin/sdl-config to get it into PATH.
While linking towards SDL I get alot of errors, which
seems to be the SDL links to their dependencies…
Here’s a few of the errors, excuse the language, it
should not be hard to read anyway.

cc -Wall -O3 -ansi -I/opt/SDL/include/SDL -D_REENTRANT
-L/usr/X11R6/lib -L/usr/local/lib
L/opt/jpeg/lib -o neverball share/vec3.o share/text.o
share/image.o share/solid.o share/p
rt.o share/geom.o share/back.o share/menu.o
share/glext.o share/config.o ball/audio.o bal
/hud.o ball/game.o ball/level.o ball/set.o
ball/state.o ball/main.o -L/opt/SDL/lib -Wl,-
path,/opt/SDL/lib -lSDL -lpthread -lSDL_image
-lSDL_ttf -lSDL_mixer -lfreetype -lz -lGLU
lGL -lm
/opt/SDL/lib/libSDL_image.a(IMG_jpg.o)(.text+0x1be):
In function jpeg_SDL_RW_src': : odefinierad referens till "jpeg_resync_to_restart" /opt/SDL/lib/libSDL_image.a(IMG_jpg.o)(.text+0x258): In functionIMG_LoadJPG_RW’:
: odefinierad referens till “jpeg_std_error”

/opt/SDL/lib/libSDL_mixer.a(music.o)(.text+0x812): In
function Mix_LoadMUS': : odefinierad referens till "SMPEG_new" /opt/SDL/lib/libSDL_mixer.a(music.o)(.text+0x84f): In functionMix_LoadMUS’:
: odefinierad referens till “SMPEG_actualSpec”
/opt/SDL/lib/libSDL_mixer.a(music.o)(.text+0x9f2): In
function Mix_FreeMusic': : odefinierad referens till "SMPEG_delete" <cut> /opt/SDL/lib/libSDL_mixer.a(load_ogg.o)(.text+0x196): In functionMix_LoadOGG_RW’:
: odefinierad referens till “ov_open_callbacks”
/opt/SDL/lib/libSDL_mixer.a(load_ogg.o)(.text+0x21a):
In function Mix_LoadOGG_RW': : odefinierad referens till "ov_info" /opt/SDL/lib/libSDL_mixer.a(load_ogg.o)(.text+0x280): In functionMix_LoadOGG_RW’:
: odefinierad referens till “ov_pcm_total”
/opt/SDL/lib/libSDL_mixer.a(load_ogg.o)(.text+0x2e2):
In function `Mix_LoadOGG_RW’:

H?strusk och gr? moln - k?p en resa till solen p? Yahoo! Resor p? adressen http://se.docs.yahoo.com/travel/index.html

Hi. I got problems linking towards SDL while building.
Here’s the information requested by the FAQ:

$ which sdl-config
/usr/local/bin/sdl-config

$ sdl-config --version
1.2.7

$ locate libSDL
/opt/SDL/lib/libSDL-1.2.so.0
/opt/SDL/lib/libSDL-1.2.so.0.7.0
/opt/SDL/lib/libSDL.a
/opt/SDL/lib/libSDL_image.a
/opt/SDL/lib/libSDL_image.la
/opt/SDL/lib/libSDL.la
/opt/SDL/lib/libSDLmain.a
/opt/SDL/lib/libSDL_mixer.a
/opt/SDL/lib/libSDL_mixer.la
/opt/SDL/lib/libSDL.so
/opt/SDL/lib/libSDL_ttf.a
/opt/SDL/lib/libSDL_ttf.la

As you can see my SDL is in a nonstandard prefix.
/usr/local/sdl-config is a symlink to
/opt/SDL/bin/sdl-config to get it into PATH.
While linking towards SDL I get alot of errors, which
seems to be the SDL links to their dependencies…
Here’s a few of the errors, excuse the language, it
should not be hard to read anyway.

cc -Wall -O3 -ansi -I/opt/SDL/include/SDL -D_REENTRANT
-L/usr/X11R6/lib -L/usr/local/lib
L/opt/jpeg/lib -o neverball share/vec3.o share/text.o
share/image.o share/solid.o share/p
rt.o share/geom.o share/back.o share/menu.o
share/glext.o share/config.o ball/audio.o bal
/hud.o ball/game.o ball/level.o ball/set.o
ball/state.o ball/main.o -L/opt/SDL/lib -Wl,-
path,/opt/SDL/lib -lSDL -lpthread -lSDL_image
-lSDL_ttf -lSDL_mixer -lfreetype -lz -lGLU
lGL -lm
/opt/SDL/lib/libSDL_image.a(IMG_jpg.o)(.text+0x1be):
In function jpeg_SDL_RW_src': : odefinierad referens till "jpeg_resync_to_restart" /opt/SDL/lib/libSDL_image.a(IMG_jpg.o)(.text+0x258): In functionIMG_LoadJPG_RW’:
: odefinierad referens till “jpeg_std_error”

/opt/SDL/lib/libSDL_mixer.a(music.o)(.text+0x812): In
function Mix_LoadMUS': : odefinierad referens till "SMPEG_new" /opt/SDL/lib/libSDL_mixer.a(music.o)(.text+0x84f): In functionMix_LoadMUS’:
: odefinierad referens till “SMPEG_actualSpec”
/opt/SDL/lib/libSDL_mixer.a(music.o)(.text+0x9f2): In
function Mix_FreeMusic': : odefinierad referens till "SMPEG_delete" <cut> /opt/SDL/lib/libSDL_mixer.a(load_ogg.o)(.text+0x196): In functionMix_LoadOGG_RW’:
: odefinierad referens till “ov_open_callbacks”
/opt/SDL/lib/libSDL_mixer.a(load_ogg.o)(.text+0x21a):
In function Mix_LoadOGG_RW': : odefinierad referens till "ov_info" /opt/SDL/lib/libSDL_mixer.a(load_ogg.o)(.text+0x280): In functionMix_LoadOGG_RW’:
: odefinierad referens till “ov_pcm_total”
/opt/SDL/lib/libSDL_mixer.a(load_ogg.o)(.text+0x2e2):
In function `Mix_LoadOGG_RW’:

H?strusk och gr? moln - k?p en resa till solen p? Yahoo! Resor p? adressen http://se.docs.yahoo.com/travel/index.html

-lvorbis -lvorbisfile to your command.
(note: I’m not sure about the ogg vorbis linking but something like that I
guess)

// Alexander BussmanOn Tuesday 15 June 2004 16:31, Leo B wrote:

cc -Wall -O3 -ansi -I/opt/SDL/include/SDL -D_REENTRANT
-L/usr/X11R6/lib -L/usr/local/lib
L/opt/jpeg/lib -o neverball share/vec3.o share/text.o
share/image.o share/solid.o share/p
rt.o share/geom.o share/back.o share/menu.o
share/glext.o share/config.o ball/audio.o bal
/hud.o ball/game.o ball/level.o ball/set.o
ball/state.o ball/main.o -L/opt/SDL/lib -Wl,-
path,/opt/SDL/lib -lSDL -lpthread -lSDL_image
-lSDL_ttf -lSDL_mixer -lfreetype -lz -lGLU
lGL -lm
/opt/SDL/lib/libSDL_image.a(IMG_jpg.o)(.text+0x1be):

In function `jpeg_SDL_RW_src’:
: odefinierad referens till “jpeg_resync_to_restart”

/opt/SDL/lib/libSDL_image.a(IMG_jpg.o)(.text+0x258):

In function `IMG_LoadJPG_RW’:
: odefinierad referens till “jpeg_std_error”

/opt/SDL/lib/libSDL_mixer.a(music.o)(.text+0x812): In

function `Mix_LoadMUS’:
: odefinierad referens till “SMPEG_new”

/opt/SDL/lib/libSDL_mixer.a(music.o)(.text+0x84f): In

function `Mix_LoadMUS’:
: odefinierad referens till “SMPEG_actualSpec”

/opt/SDL/lib/libSDL_mixer.a(music.o)(.text+0x9f2): In

function `Mix_FreeMusic’:
: odefinierad referens till “SMPEG_delete”

/opt/SDL/lib/libSDL_mixer.a(load_ogg.o)(.text+0x196):

In function `Mix_LoadOGG_RW’:
: odefinierad referens till “ov_open_callbacks”

/opt/SDL/lib/libSDL_mixer.a(load_ogg.o)(.text+0x21a):

In function `Mix_LoadOGG_RW’:
: odefinierad referens till “ov_info”

/opt/SDL/lib/libSDL_mixer.a(load_ogg.o)(.text+0x280):

In function `Mix_LoadOGG_RW’:
: odefinierad referens till “ov_pcm_total”

/opt/SDL/lib/libSDL_mixer.a(load_ogg.o)(.text+0x2e2):
In function `Mix_LoadOGG_RW’:

From the looks of it… it seams like you need to add -ljpeg -lsmpeg -logg