forums.ps2dev.org Forum Index forums.ps2dev.org
Homebrew PS2, PSP & PS3 Development Discussions
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Problem with sdlmixer

 
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PS2 Development
View previous topic :: View next topic  
Author Message
belek666



Joined: 14 Apr 2008
Posts: 21

PostPosted: Tue Aug 11, 2009 6:00 pm    Post subject: Problem with sdlmixer Reply with quote

Hello,
I've problem with compiling some sdl code for ps2. This is the output of error:

Code:
$ make
ee-gcc -D_EE -O2 -G0 -Wall  -I/usr/local/ps2dev/ps2sdk/ee/include -I/usr/local/p
s2dev/ps2sdk/common/include -I. -I/usr/local/ps2dev/ps2sdk/sbv/include -I/usr/lo
cal/ps2dev/ps2sdk/ports/include/SDL -I/usr/local/ps2dev/ps2sdk/ports -I/usr/loca
l/ps2dev/ps2sdk/ports/include -c main.c -o main.o
ee-gcc -D_EE -O2 -G0 -Wall  -I/usr/local/ps2dev/ps2sdk/ee/include -I/usr/local/p
s2dev/ps2sdk/common/include -I. -I/usr/local/ps2dev/ps2sdk/sbv/include -I/usr/lo
cal/ps2dev/ps2sdk/ports/include/SDL -I/usr/local/ps2dev/ps2sdk/ports -I/usr/loca
l/ps2dev/ps2sdk/ports/include -c ps2.c -o ps2.o
ps2.c: In function `IOP_reset':
ps2.c:28: warning: implicit declaration of function `SifExitIopHeap'
bin2s irx/usbd.irx obj/usbd_irx.s usbd_irx
ee-as -G0  obj/usbd_irx.s -o obj/usbd_irx.o
bin2s irx/usbhdfsd.irx obj/usbhdfsd_irx.s usbhdfsd_irx
ee-as -G0  obj/usbhdfsd_irx.s -o obj/usbhdfsd_irx.o
bin2s irx/ps2kbd.irx obj/ps2kbd_irx.s ps2kbd_irx
ee-as -G0  obj/ps2kbd_irx.s -o obj/ps2kbd_irx.o
bin2s irx/ps2mouse.irx obj/ps2mouse_irx.s ps2mouse_irx
ee-as -G0  obj/ps2mouse_irx.s -o obj/ps2mouse_irx.o
ee-gcc -mno-crt0 -T/usr/local/ps2dev/ps2sdk/ee/startup/linkfile -L/usr/local/ps2
dev/ps2sdk/ee/lib -L/usr/local/ps2dev/ps2sdk/sbv/lib -L/usr/local/ps2dev/ps2sdk/
ports/lib \
        -o bin/sdl.elf /usr/local/ps2dev/ps2sdk/ee/startup/crt0.o main.o ps2.o o
bj/usbd_irx.o obj/usbhdfsd_irx.o obj/ps2kbd_irx.o obj/ps2mouse_irx.o -lpatches -
lc -ldebug -lsdlmain -lsdl -lsdlmixer -lc -lkernel
C:/msys/1.0/local/ps2dev/ps2sdk/ports/lib\libsdlmixer.a(wavestream.o)(.text+0x31
8): In function `WAVStream_PlaySome':
wavestream.c: undefined reference to `SDL_MixAudio'
C:/msys/1.0/local/ps2dev/ps2sdk/ports/lib\libsdlmixer.a(mixer.o)(.text+0x318): I
n function `mix_channels':
mixer.c: undefined reference to `SDL_MixAudio'
C:/msys/1.0/local/ps2dev/ps2sdk/ports/lib\libsdlmixer.a(mixer.o)(.text+0x3fc):mi
xer.c: undefined reference to `SDL_MixAudio'
C:/msys/1.0/local/ps2dev/ps2sdk/ports/lib\libsdlmixer.a(mixer.o)(.text+0x9d8): I
n function `Mix_LoadWAV_RW':
mixer.c: undefined reference to `SDL_LoadWAV_RW'
C:/msys/1.0/local/ps2dev/ps2sdk/ports/lib\libsdlmixer.a(mixer.o)(.text+0xa58):mi
xer.c: undefined reference to `SDL_FreeWAV'
C:/msys/1.0/local/ps2dev/ps2sdk/ports/lib\libsdlmixer.a(mixer.o)(.text+0xab8):mi
xer.c: undefined reference to `SDL_FreeWAV'
make: *** [bin/sdl.elf] Error 1


Makefile:

Code:


EE_BIN   = bin/sdl.elf
EE_OBJS  = main.o ps2.o obj/usbd_irx.o obj/usbhdfsd_irx.o obj/ps2kbd_irx.o obj/ps2mouse_irx.o


EE_LIBS += -lpatches -lc -ldebug -lsdlmain -lsdl -lsdlmixer
EE_INCS :=  -I$(PS2SDK)/sbv/include -I$(PS2SDK)/ports/include/SDL
EE_LDFLAGS := -L$(PS2SDK)/sbv/lib -L$(PS2SDK)/ports/lib

all: $(EE_BIN)
    ps2_packer/ps2_packer bin/sdl.elf bin/packed_sdl.elf
clean:
   rm -f *.o bin/*.elf *.S *.s http obj/*.o obj/*.s *.o    

obj/usbd_irx.s:
   bin2s irx/usbd.irx obj/usbd_irx.s usbd_irx
obj/usbhdfsd_irx.s:
   bin2s irx/usbhdfsd.irx obj/usbhdfsd_irx.s usbhdfsd_irx
obj/ps2kbd_irx.s:
   bin2s irx/ps2kbd.irx obj/ps2kbd_irx.s ps2kbd_irx
obj/ps2mouse_irx.s:
   bin2s irx/ps2mouse.irx obj/ps2mouse_irx.s ps2mouse_irx
   
include $(PS2SDK)/samples/Makefile.pref
include $(PS2SDK)/samples/Makefile.eeglobal


I'm using LBGSHI Pre-Built, Win32 PS2SDK. Thanks for help.
Back to top
View user's profile Send private message
tsomctl



Joined: 09 Dec 2008
Posts: 5

PostPosted: Fri Aug 14, 2009 8:37 am    Post subject: Reply with quote

In your makefile, try changing the order of the libraries in EE_LIBS, eg:

Code:

EE_LIBS += -lpatches -lc -ldebug -lsdlmixer  -lsdlmain -lsdl


I'm not too familiar with sdl, but the order of the libraries can affect how the linker resolves symbols. Also, you might need to link in some other sdl library. Look in /usr/local/ps2dev/ps2sdk/ports/lib for other sdl libraries you might need.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PS2 Development All times are GMT + 10 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group