Hello,
I recently tried to use SDL mixer in my SDL app, and I am getting an error. I installed the latest version from the SVN, built and installed it. I am using cygwin and the bash shell to install. When installing, I received the following error:
checking for C compiler default output file name... configure: error: C compiler
cannot create executables
See `config.log' for more details.
I ran this version of configure, just as it appears in reame.psp:
LDFLAGS="-L`psp-config --pspsdk-path`/lib -lc -lpspuser" ./configure --host psp --with-sdl-prefix=`psp-config --psp-prefix` --disable-music-mp3 --prefix=`psp-config --psp-prefix`
I went to an old SDL checkout I had, and found the older command to run configure was as follows:
LDFLAGS="-L`psp-config --pspsdk-path`/lib -lc -lpspuser -lpsputility" ./configure --host psp --with-sdl-prefix=`psp-config --psp-prefix` --disable-music-mp3 --prefix=`psp-config --psp-prefix`
The second command worked and installed SDL_mixer correctly. It only differs from the first in that it has the "-lpsputility" option.
When I try to use SDL mixer in a program, I get the following errors:
>make
psp-gcc -I. -I/usr/local/pspdev/psp/sdk/include -O2 -G0 -Wall `/usr/local/pspdev
/psp/sdk/../bin/sdl-config --cflags` -DNOUNCRYPT -c -o sp.o sp.c
sp.c: In function 'SDL_main':
sp.c:157: warning: passing argument 1 of 'SDL_CreateThread' from incompatible pointer type
psp-gcc -I. -I/usr/local/pspdev/psp/sdk/include -O2 -G0 -Wall `/usr/local/pspdev
/psp/sdk/../bin/sdl-config --cflags` -DNOUNCRYPT -L. -L/usr/local/pspdev/psp/sd
k/lib sp.o hero_manager.o sprite_manager.o map_manager.o bg_manager.o power_ma
nager.o zip_manager.o unzip.o ioapi.o image_manager.o dl_manager.o `/usr/local/p
spdev/psp/sdk/../bin/sdl-config --libs` -lm -lSDL_gfx -lSDL_image -lSDL_mixer -l
png -lz -lm -ljpeg -lpspwlan -lpspgu -lpsppower -lpspdebug -lpspdisplay -lpspge
-lpspctrl -lpspsdk -lc -lpsputility -lpspuser -lpspkernel -o sp.elf
/usr/local/pspdev/psp/lib/libSDL_mixer.a(mixer.o): In function `mix_channels':
/cygdrive/c/Documents/Computer/psphome/devtools/20051208/SDL_mixer/mixer.c:207:
undefined reference to `SDL_MixAudio'
/cygdrive/c/Documents/Computer/psphome/devtools/20051208/SDL_mixer/mixer.c:231:
undefined reference to `SDL_MixAudio'
/usr/local/pspdev/psp/lib/libSDL_mixer.a(mixer.o): In function `Mix_LoadWAV_RW':
/cygdrive/c/Documents/Computer/psphome/devtools/20051208/SDL_mixer/mixer.c:433:
undefined reference to `SDL_LoadWAV_RW'
/cygdrive/c/Documents/Computer/psphome/devtools/20051208/SDL_mixer/mixer.c:482:
undefined reference to `SDL_FreeWAV'
/cygdrive/c/Documents/Computer/psphome/devtools/20051208/SDL_mixer/mixer.c:477:
undefined reference to `SDL_FreeWAV'
/usr/local/pspdev/psp/lib/libSDL_mixer.a(wavestream.o): In function `WAVStream_P
laySome':
/cygdrive/c/Documents/Computer/psphome/devtools/20051208/SDL_mixer/wavestream.c:
196: undefined reference to `SDL_MixAudio'
/cygdrive/c/Documents/Computer/psphome/devtools/20051208/SDL_mixer/wavestream.c:
196: undefined reference to `SDL_MixAudio'
collect2: ld returned 1 exit status
make: *** [sp.elf] Error 1
It appears that the installed libraries are somehow pointing to the directory where I compiled/installed SDL_Mixer from (psphome/devtools/20051208/SDL_mixer/). I have no idea how that could be possible. My makefile is as follows:
TARGET = sp
OBJS = sp.o hero_manager.o sprite_manager.o map_manager.o bg_manager.o power_manager.o
OBJS += zip_manager.o unzip.o ioapi.o image_manager.o dl_manager.o
INCDIR =
CFLAGS = -O2 -G0 -Wall
CXXFLAGS = $(CFLAGS) -fno-exceptions -fno-rtti
ASFLAGS = $(CFLAGS)
LIBDIR =
LDFLAGS =
EXTRA_TARGETS = EBOOT.PBP kxploit
EXTRA_CLEAN = my-clean
PSP_EBOOT_TITLE = SP
PSP_DIR_NAME = SDLTEST
PSPSDK=$(shell psp-config --pspsdk-path)
PSPBIN = $(PSPSDK)/../bin
CFLAGS += `$(PSPBIN)/sdl-config --cflags` -DNOUNCRYPT
LIBS = `$(PSPBIN)/sdl-config --libs` -lm -lSDL_gfx -lSDL_image -lSDL_mixer -lpng -lz -lm -ljpeg -lpspwlan -lpspgu -lpsppower
include $(PSPSDK)/lib/build.mak
Does anyone have any idea why I am getting these weird compiler errors when trying to compile a program using SDL_Mixer? Could it have something to do with ./configure not running correctly using the newer version from the latest SDL_Mixer's readme.psp? Any help is appreciated!
Garak