GP32 Problems Compiling Sdl App


thor27

Still Fresh
Joined
May 21, 2008
Messages
1
Hello! I've already read many topics over this forum but still get no success compiling my SDL game (that compiles fine on my PC)

The problem happens during LD, so I still have no clues of what to do.

Thanks for the help!!

CODE

thor27@thor27-laptop:/opt/open2x/utpong$ export PATH=$PATH:/opt/open2x/gcc-4.1.1-glibc-2.3.6/bin

thor27@thor27-laptop:/opt/open2x/utpong$ arm-open2x-linux-g++ pong.cpp -o pong -I /opt/open2x/gcc-4.1.1-glibc-2.3.6/include/ -I /opt/open2x/gcc-4.1.1-glibc-2.3.6/include/SDL -L /opt/open2x/gcc-4.1.1-glibc-2.3.6/lib -static -lSDL -lSDL_mixer -lSDL_image -lSDL_ttf -lpthread -D_REENTRANT

/opt/open2x/gcc-4.1.1-glibc-2.3.6/lib/libSDL_mixer.a(mixer.o): In function `Mix_LoadWAV_RW':
mixer.c:(.text+0xcb8): undefined reference to `SDL_ReadLE32'
mixer.c:(.text+0xd60): undefined reference to `SDL_LoadWAV_RW'
mixer.c:(.text+0xdf0): undefined reference to `SDL_FreeWAV'
mixer.c:(.text+0xe84): undefined reference to `SDL_FreeWAV'
mixer.c:(.text+0xec0): undefined reference to `SDL_FreeWAV'
/opt/open2x/gcc-4.1.1-glibc-2.3.6/lib/libSDL_mixer.a(mixer.o): In function `mix_channels':
mixer.c:(.text+0x1d54): undefined reference to `SDL_MixAudio'
mixer.c:(.text+0x1ec4): undefined reference to `SDL_MixAudio'
/opt/open2x/gcc-4.1.1-glibc-2.3.6/lib/libSDL_mixer.a(music.o): In function `open_music':
music.c:(.text+0x3ec): undefined reference to `SMPEG_setvolume'
/opt/open2x/gcc-4.1.1-glibc-2.3.6/lib/libSDL_mixer.a(music.o): In function `Mix_PlayingMusic':
music.c:(.text+0x4f8): undefined reference to `SMPEG_status'
/opt/open2x/gcc-4.1.1-glibc-2.3.6/lib/libSDL_mixer.a(music.o): In function `Mix_SetMusicPosition':
music.c:(.text+0x600): undefined reference to `SMPEG_skip'
music.c:(.text+0x61c): undefined reference to `SMPEG_rewind'
music.c:(.text+0x628): undefined reference to `SMPEG_play'
/opt/open2x/gcc-4.1.1-glibc-2.3.6/lib/libSDL_mixer.a(music.o): In function `Mix_SetMusicCMD':
music.c:(.text+0x71c): undefined reference to `SMPEG_stop'
/opt/open2x/gcc-4.1.1-glibc-2.3.6/lib/libSDL_mixer.a(music.o): In function `Mix_VolumeMusic':
music.c:(.text+0x7ec): undefined reference to `SMPEG_setvolume'
/opt/open2x/gcc-4.1.1-glibc-2.3.6/lib/libSDL_mixer.a(music.o): In function `Mix_LoadMUS':
music.c:(.text+0xd2c): undefined reference to `SMPEG_new'
music.c:(.text+0xd80): undefined reference to `SMPEG_actualSpec'
/opt/open2x/gcc-4.1.1-glibc-2.3.6/lib/libSDL_mixer.a(music.o): In function `Mix_HaltMusic':
music.c:(.text+0xe54): undefined reference to `SMPEG_stop'
/opt/open2x/gcc-4.1.1-glibc-2.3.6/lib/libSDL_mixer.a(music.o): In function `music_internal_play':
music.c:(.text+0xf80): undefined reference to `SMPEG_setvolume'
music.c:(.text+0x104c): undefined reference to `SMPEG_enableaudio'
music.c:(.text+0x1058): undefined reference to `SMPEG_enablevideo'
music.c:(.text+0x1064): undefined reference to `SMPEG_play'
music.c:(.text+0x10d8): undefined reference to `SMPEG_stop'
music.c:(.text+0x1140): undefined reference to `SMPEG_setvolume'
music.c:(.text+0x119c): undefined reference to `SMPEG_skip'
music.c:(.text+0x11b8): undefined reference to `SMPEG_rewind'
music.c:(.text+0x11c4): undefined reference to `SMPEG_play'
/opt/open2x/gcc-4.1.1-glibc-2.3.6/lib/libSDL_mixer.a(music.o): In function `Mix_FreeMusic':
music.c:(.text+0x13d4): undefined reference to `SMPEG_delete'
music.c:(.text+0x1460): undefined reference to `SMPEG_stop'
/opt/open2x/gcc-4.1.1-glibc-2.3.6/lib/libSDL_mixer.a(music.o): In function `music_mixer':
music.c:(.text+0x1564): undefined reference to `SMPEG_status'
music.c:(.text+0x16cc): undefined reference to `SMPEG_stop'
music.c:(.text+0x171c): undefined reference to `SMPEG_playAudio'
music.c:(.text+0x1778): undefined reference to `SMPEG_setvolume'
/opt/open2x/gcc-4.1.1-glibc-2.3.6/lib/libSDL_mixer.a(music.o): In function `close_music':
music.c:(.text+0x1844): undefined reference to `SMPEG_stop'
/opt/open2x/gcc-4.1.1-glibc-2.3.6/lib/libSDL_mixer.a(wavestream.o): In function `WAVStream_PlaySome':
wavestream.c:(.text+0x1c4): undefined reference to `SDL_MixAudio'
/opt/open2x/gcc-4.1.1-glibc-2.3.6/lib/libSDL_mixer.a(wavestream.o): In function `ReadChunk':
wavestream.c:(.text+0x238): undefined reference to `SDL_ReadLE32'
wavestream.c:(.text+0x244): undefined reference to `SDL_ReadLE32'
/opt/open2x/gcc-4.1.1-glibc-2.3.6/lib/libSDL_mixer.a(wavestream.o): In function `WAVStream_LoadSong':
wavestream.c:(.text+0x348): undefined reference to `SDL_ReadLE32'
wavestream.c:(.text+0x354): undefined reference to `SDL_ReadLE32'
wavestream.c:(.text+0x35c): undefined reference to `SDL_ReadLE32'
/opt/open2x/gcc-4.1.1-glibc-2.3.6/lib/libSDL_mixer.a(wavestream.o):wavestream.c:(.text+0x4c0): more undefined references to `SDL_ReadLE32' follow
/opt/open2x/gcc-4.1.1-glibc-2.3.6/lib/libSDL_mixer.a(wavestream.o): In function `WAVStream_LoadSong':
wavestream.c:(.text+0x4cc): undefined reference to `SDL_ReadBE32'
wavestream.c:(.text+0x4d4): undefined reference to `SDL_ReadLE32'
wavestream.c:(.text+0x550): undefined reference to `SDL_ReadLE32'
wavestream.c:(.text+0x55c): undefined reference to `SDL_ReadBE32'
wavestream.c:(.text+0x594): undefined reference to `SDL_ReadBE32'
wavestream.c:(.text+0x5a0): undefined reference to `SDL_ReadBE32'
wavestream.c:(.text+0x66c): undefined reference to `SDL_ReadBE16'
wavestream.c:(.text+0x678): undefined reference to `SDL_ReadBE32'
wavestream.c:(.text+0x684): undefined reference to `SDL_ReadBE16'
/opt/open2x/gcc-4.1.1-glibc-2.3.6/lib/libSDL_mixer.a(load_aiff.o): In function `Mix_LoadAIFF_RW':
load_aiff.c:(.text+0x1c): undefined reference to `SDL_ReadLE32'
load_aiff.c:(.text+0x28): undefined reference to `SDL_ReadBE32'
load_aiff.c:(.text+0x3c): undefined reference to `SDL_ReadLE32'
load_aiff.c:(.text+0x120): undefined reference to `SDL_ReadLE32'
load_aiff.c:(.text+0x12c): undefined reference to `SDL_ReadBE32'
load_aiff.c:(.text+0x1a8): undefined reference to `SDL_ReadBE16'
load_aiff.c:(.text+0x1b4): undefined reference to `SDL_ReadBE32'
load_aiff.c:(.text+0x1c0): undefined reference to `SDL_ReadBE16'
load_aiff.c:(.text+0x2b4): undefined reference to `SDL_ReadBE32'
load_aiff.c:(.text+0x2c0): undefined reference to `SDL_ReadBE32'
load_aiff.c:(.text+0x2f0): undefined reference to `SDL_ReadBE32'
load_aiff.c:(.text+0x2f8): undefined reference to `SDL_ReadBE32'
load_aiff.c:(.text+0x300): undefined reference to `SDL_ReadBE32'
load_aiff.c:(.text+0x308): undefined reference to `SDL_ReadBE16'
/opt/open2x/gcc-4.1.1-glibc-2.3.6/lib/libSDL_image.a(IMG_bmp.o): In function `IMG_LoadBMP_RW':
IMG_bmp.c:(.text+0xd0): undefined reference to `SDL_ReadLE32'
IMG_bmp.c:(.text+0xd8): undefined reference to `SDL_ReadLE16'
IMG_bmp.c:(.text+0xe0): undefined reference to `SDL_ReadLE16'
IMG_bmp.c:(.text+0xe8): undefined reference to `SDL_ReadLE32'
IMG_bmp.c:(.text+0xf4): undefined reference to `SDL_ReadLE32'
IMG_bmp.c:(.text+0x108): undefined reference to `SDL_ReadLE32'
IMG_bmp.c:(.text+0x114): undefined reference to `SDL_ReadLE32'
IMG_bmp.c:(.text+0x120): undefined reference to `SDL_ReadLE16'
IMG_bmp.c:(.text+0x128): undefined reference to `SDL_ReadLE16'
IMG_bmp.c:(.text+0x134): undefined reference to `SDL_ReadLE32'
IMG_bmp.c:(.text+0x140): undefined reference to `SDL_ReadLE32'
IMG_bmp.c:(.text+0x148): undefined reference to `SDL_ReadLE32'
IMG_bmp.c:(.text+0x150): undefined reference to `SDL_ReadLE32'
IMG_bmp.c:(.text+0x158): undefined reference to `SDL_ReadLE32'
/opt/open2x/gcc-4.1.1-glibc-2.3.6/lib/libSDL_image.a(IMG_bmp.o):IMG_bmp.c:(.text+0x160): more undefined references to `SDL_ReadLE32' follow
/opt/open2x/gcc-4.1.1-glibc-2.3.6/lib/libSDL_image.a(IMG_bmp.o): In function `IMG_LoadBMP_RW':
IMG_bmp.c:(.text+0x598): undefined reference to `SDL_ReadLE16'
IMG_bmp.c:(.text+0x5a4): undefined reference to `SDL_ReadLE16'
IMG_bmp.c:(.text+0x5b0): undefined reference to `SDL_ReadLE16'
IMG_bmp.c:(.text+0x5b8): undefined reference to `SDL_ReadLE16'
/opt/open2x/gcc-4.1.1-glibc-2.3.6/lib/libSDL_image.a(IMG_jpg.o): In function `IMG_LoadJPG_RW':
IMG_jpg.c:(.text+0xd0): undefined reference to `jpeg_std_error'
IMG_jpg.c:(.text+0x108): undefined reference to `jpeg_CreateDecompress'
IMG_jpg.c:(.text+0x158): undefined reference to `jpeg_read_header'
IMG_jpg.c:(.text+0x16c): undefined reference to `jpeg_calc_output_dimensions'
IMG_jpg.c:(.text+0x1b4): undefined reference to `jpeg_start_decompress'
IMG_jpg.c:(.text+0x1ec): undefined reference to `jpeg_read_scanlines'
IMG_jpg.c:(.text+0x204): undefined reference to `jpeg_finish_decompress'
IMG_jpg.c:(.text+0x20c): undefined reference to `jpeg_destroy_decompress'
IMG_jpg.c:(.text+0x22c): undefined reference to `jpeg_destroy_decompress'
IMG_jpg.c:(.text+0x284): undefined reference to `jpeg_resync_to_restart'
/opt/open2x/gcc-4.1.1-glibc-2.3.6/lib/libSDL_image.a(IMG_png.o): In function `IMG_LoadPNG_RW':
IMG_png.c:(.text+0x40): undefined reference to `png_create_read_struct'
IMG_png.c:(.text+0x50): undefined reference to `png_create_info_struct'
IMG_png.c:(.text+0x90): undefined reference to `png_destroy_read_struct'
IMG_png.c:(.text+0xbc): undefined reference to `png_set_read_fn'
IMG_png.c:(.text+0xc8): undefined reference to `png_read_info'
IMG_png.c:(.text+0xfc): undefined reference to `png_get_IHDR'
IMG_png.c:(.text+0x104): undefined reference to `png_set_strip_16'
IMG_png.c:(.text+0x10c): undefined reference to `png_set_packing'
IMG_png.c:(.text+0x128): undefined reference to `png_get_valid'
IMG_png.c:(.text+0x148): undefined reference to `png_read_update_info'
IMG_png.c:(.text+0x180): undefined reference to `png_get_IHDR'
IMG_png.c:(.text+0x2a0): undefined reference to `png_read_image'
IMG_png.c:(.text+0x320): undefined reference to `png_get_tRNS'
IMG_png.c:(.text+0x388): undefined reference to `png_set_expand'
IMG_png.c:(.text+0x394): undefined reference to `png_set_expand'
IMG_png.c:(.text+0x43c): undefined reference to `png_set_gray_to_rgb'
/opt/open2x/gcc-4.1.1-glibc-2.3.6/lib/libSDL_image.a(IMG_png.o): In function `png_read_data':
IMG_png.c:(.text+0x4a0): undefined reference to `png_get_io_ptr'
/opt/open2x/gcc-4.1.1-glibc-2.3.6/lib/libSDL_image.a(IMG_png.o): In function `IMG_isPNG':
IMG_png.c:(.text+0x504): undefined reference to `png_sig_cmp'
/opt/open2x/gcc-4.1.1-glibc-2.3.6/lib/libSDL_ttf.a(SDL_ttf.o): In function `TTF_Quit':
SDL_ttf.c:(.text+0x104): undefined reference to `FT_Done_FreeType'
/opt/open2x/gcc-4.1.1-glibc-2.3.6/lib/libSDL_ttf.a(SDL_ttf.o): In function `Load_Glyph':
SDL_ttf.c:(.text+0x15c): undefined reference to `FT_Load_Glyph'
SDL_ttf.c:(.text+0x2f0): undefined reference to `FT_Render_Glyph'
SDL_ttf.c:(.text+0x584): undefined reference to `FT_Get_Char_Index'
SDL_ttf.c:(.text+0x59c): undefined reference to `FT_Render_Glyph'
SDL_ttf.c:(.text+0x5dc): undefined reference to `FT_Outline_Transform'
/opt/open2x/gcc-4.1.1-glibc-2.3.6/lib/libSDL_ttf.a(SDL_ttf.o): In function `TTF_Init':
SDL_ttf.c:(.text+0x870): undefined reference to `FT_Init_FreeType'
/opt/open2x/gcc-4.1.1-glibc-2.3.6/lib/libSDL_ttf.a(SDL_ttf.o): In function `TTF_CloseFont':
SDL_ttf.c:(.text+0x964): undefined reference to `FT_Done_Face'
/opt/open2x/gcc-4.1.1-glibc-2.3.6/lib/libSDL_ttf.a(SDL_ttf.o): In function `TTF_OpenFontIndexRW':
SDL_ttf.c:(.text+0xaf0): undefined reference to `FT_Open_Face'
SDL_ttf.c:(.text+0xb38): undefined reference to `FT_Set_Pixel_Sizes'
SDL_ttf.c:(.text+0xc1c): undefined reference to `FT_Set_Char_Size'
SDL_ttf.c:(.text+0xc38): undefined reference to `FT_MulFix'
SDL_ttf.c:(.text+0xc60): undefined reference to `FT_MulFix'
SDL_ttf.c:(.text+0xc98): undefined reference to `FT_MulFix'
SDL_ttf.c:(.text+0xcc0): undefined reference to `FT_MulFix'
SDL_ttf.c:(.text+0xce4): undefined reference to `FT_MulFix'
/opt/open2x/gcc-4.1.1-glibc-2.3.6/lib/libSDL_ttf.a(SDL_ttf.o): In function `TTF_SizeUNICODE':
SDL_ttf.c:(.text+0x13b0): undefined reference to `FT_Get_Kerning'
/opt/open2x/gcc-4.1.1-glibc-2.3.6/lib/libSDL_ttf.a(SDL_ttf.o): In function `TTF_RenderUNICODE_Blended':
SDL_ttf.c:(.text+0x1858): undefined reference to `FT_Get_Kerning'
/opt/open2x/gcc-4.1.1-glibc-2.3.6/lib/libSDL_ttf.a(SDL_ttf.o): In function `TTF_RenderUNICODE_Solid':
SDL_ttf.c:(.text+0x1ecc): undefined reference to `FT_Get_Kerning'
/opt/open2x/gcc-4.1.1-glibc-2.3.6/lib/libSDL_ttf.a(SDL_ttf.o): In function `TTF_RenderUNICODE_Shaded':
SDL_ttf.c:(.text+0x2e90): undefined reference to `FT_Get_Kerning'
collect2: ld returned 1 exit status
 

paeryn

Reclusive maniac
Joined
Nov 28, 2005
Messages
432
Age
49
Location
Sheffield, England
Website
paeryn.myby.co.uk
ThOR27 said:
Hello! I've already read many topics over this forum but still get no success compiling my SDL game (that compiles fine on my PC)

The problem happens during LD, so I still have no clues of what to do.

Thanks for the help!!

CODE

thor27@thor27-laptop:/opt/open2x/utpong$ export PATH=$PATH:/opt/open2x/gcc-4.1.1-glibc-2.3.6/bin

thor27@thor27-laptop:/opt/open2x/utpong$ arm-open2x-linux-g++ pong.cpp -o pong -I /opt/open2x/gcc-4.1.1-glibc-2.3.6/include/ -I /opt/open2x/gcc-4.1.1-glibc-2.3.6/include/SDL -L /opt/open2x/gcc-4.1.1-glibc-2.3.6/lib -static -lSDL -lSDL_mixer -lSDL_image -lSDL_ttf -lpthread -D_REENTRANT
You'll need a few more libs linking in, for SDL_image you'll also need -ljpeg -lpng -lz -lm
For SDL_mixer you'll need -lvorbisidec -lmikmod
For SDL_ttf you'll need -lfreetype

Put the required libs straight after the SDL lib that needs them (that usually works - order is important when statically linking.)

Hope that helps.
 
Last edited by a moderator:
Top