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 

Problems with compiling my engine.

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



Joined: 30 Oct 2007
Posts: 35

PostPosted: Sun Dec 09, 2007 10:18 am    Post subject: Problems with compiling my engine. Reply with quote

Hello everyone.

I've written a little 2d-engine using SDL and it's working fine. I'm trying to port it to the PSP, but i'm getting tons and tons of errors. I compiled psptoolchain, SDL, SDL_image and SDL_mixer without problems. I use Code::Blocks to compile it for the pc, but the IDE doesn't generate Makefiles so i have used the one found in the trunk/tests/SDL/ folder and modified it a bit. Here is what it looks like:

Code:

TARGET = engine
OBJS = main.o globals/globals.o globals/Timer.o sound/Sound.o sound/SoundEffect.o sound/Music.o graphics/Texture.o graphics/StaticTexture.o graphics/Animation.o graphics/TextureManager.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 = OguEngine
PSP_DIR_NAME = OguEngine
PSP_FW_VERSION = 371

PSPSDK=$(shell psp-config --pspsdk-path)
PSPBIN = $(PSPSDK)/../bin
CFLAGS += $(shell $(PSPBIN)/sdl-config --cflags)
LIBS += $(shell $(PSPBIN)/sdl-config --libs) -lSDL_image -lSDL_mixer
include $(PSPSDK)/lib/build.mak


It can just as well be a problem with the makefile, because i've never used them before. The errors i'm getting are:

Code:
main.o: In function `SDL_main(int, char**)':
main.cpp:(.text+0xa0): undefined reference to `std::basic_string<char, std::char_traits<char>, std::allocator<char> >::basic_string(char const*, std::allocator<char> const&)'
main.cpp:(.text+0xcc): undefined reference to `std::basic_string<char, std::char_traits<char>, std::allocator<char> >::_Rep::_S_empty_rep_storage'
main.cpp:(.text+0xd4): undefined reference to `std::basic_string<char, std::char_traits<char>, std::allocator<char> >::_Rep::_S_empty_rep_storage'


Code:
Music.cpp:(.text+0xfc): undefined reference to `operator delete(void*)'


Code:

/usr/local/pspdev/psp/lib/libSDL_image.a(IMG_bmp.o): In function `IMG_LoadBMP_RW':
/home/oguz/Downloads/ps2dev/SDL_image/IMG_bmp.c:196: undefined reference to `SDL_ReadLE32'
/home/oguz/Downloads/ps2dev/SDL_image/IMG_bmp.c:197: undefined reference to `SDL_ReadLE16'
/home/oguz/Downloads/ps2dev/SDL_image/IMG_bmp.c:198: undefined reference to `SDL_ReadLE16'
/home/oguz/Downloads/ps2dev/SDL_image/IMG_bmp.c:199: undefined reference to `SDL_ReadLE32'


Code:
/home/oguz/Downloads/ps2dev/SDL_mixer/load_aiff.c:158: undefined reference to `SDL_ReadBE32'
/home/oguz/Downloads/ps2dev/SDL_mixer/load_aiff.c:159: undefined reference to `SDL_ReadBE32'
/home/oguz/Downloads/ps2dev/SDL_mixer/load_aiff.c:160: undefined reference to `SDL_ReadBE32'
/home/oguz/Downloads/ps2dev/SDL_mixer/load_aiff.c:161: undefined reference to `SDL_ReadBE16'
/usr/local/pspdev/psp/lib/libSDL_mixer.a(mix.o): In function `update_tremolo':
/home/oguz/Downloads/ps2dev/SDL_mixer/timidity/mix.c:188: undefined reference to `sin'
/usr/local/pspdev/psp/lib/libSDL_mixer.a(filter.o): In function `designfir':
/home/oguz/Downloads/ps2dev/SDL_mixer/timidity/filter.c:88: undefined reference to `sin'
/home/oguz/Downloads/ps2dev/SDL_mixer/timidity/filter.c:92: undefined reference to `log'
/home/oguz/Downloads/ps2dev/SDL_mixer/timidity/filter.c:92: undefined reference to `exp'
/usr/local/pspdev/psp/lib/libSDL_mixer.a(filter.o): In function `kaiser':
/home/oguz/Downloads/ps2dev/SDL_mixer/timidity/filter.c:70: undefined reference to `sqrt'


These are just a few of them of which i think are relevant. It's C++ code but psp-gcc is used (i don't know why). And i see references to my downloads folder where i stored the stuff from the ps2dev SVN. I'm really confused, i hope someone can guide me in the right way.
Back to top
View user's profile Send private message
CpuWhiz



Joined: 04 Jun 2007
Posts: 42

PostPosted: Sun Dec 09, 2007 11:19 am    Post subject: Re: Problems with compiling my engine. Reply with quote

Oguz286 wrote:
Code:
Music.cpp:(.text+0xfc): undefined reference to `operator delete(void*)'

-lstdc++

Oguz286 wrote:
Code:
/home/oguz/Downloads/ps2dev/SDL_mixer/timidity/filter.c:88: undefined reference to `sin'

-lm

Some of the others will go away when you add these. Not so sure on the SDL_Read ones though. Check the output of sdl-config is good? Maybe shuffle the order around some? It should have added -lm because my sdl-config is showing the following:
Code:
-L/usr/local/pspdev/psp/lib -lSDLmain -lSDL -lm -lGL -lpspvfpu -L/usr/local/pspdev/psp/sdk/lib -lpspdebug -lpspgu -lpspctrl -lpspge -lpspdisplay -lpsphprm -lpspsdk -lpsprtc -lpspaudio -lc -lpspuser -lpsputility -lpspkernel -lpspnet_inet -lpspirkeyb -lpsppower
Back to top
View user's profile Send private message
Oguz286



Joined: 30 Oct 2007
Posts: 35

PostPosted: Sun Dec 09, 2007 11:49 am    Post subject: Re: Problems with compiling my engine. Reply with quote

CpuWhiz wrote:
Oguz286 wrote:
Code:
Music.cpp:(.text+0xfc): undefined reference to `operator delete(void*)'

-lstdc++

Oguz286 wrote:
Code:
/home/oguz/Downloads/ps2dev/SDL_mixer/timidity/filter.c:88: undefined reference to `sin'

-lm

Some of the others will go away when you add these. Not so sure on the SDL_Read ones though. Check the output of sdl-config is good? Maybe shuffle the order around some? It should have added -lm because my sdl-config is showing the following:
Code:
-L/usr/local/pspdev/psp/lib -lSDLmain -lSDL -lm -lGL -lpspvfpu -L/usr/local/pspdev/psp/sdk/lib -lpspdebug -lpspgu -lpspctrl -lpspge -lpspdisplay -lpsphprm -lpspsdk -lpsprtc -lpspaudio -lc -lpspuser -lpsputility -lpspkernel -lpspnet_inet -lpspirkeyb -lpsppower


Thanks for the reply!

-lstdc++ helped clear away the mayority of the errors. But i still think it should use the psp-g++ compiler instead.

-lm didn't solve anything unfortunately.

The errors now are:

Code:

/usr/local/pspdev/psp/lib/libSDLmain.a(SDL_psp_main.o): In function `main':
psp/SDL_psp_main.c:178: undefined reference to `SDL_main'
/usr/local/pspdev/psp/lib/libSDL_image.a(IMG_bmp.o): In function `IMG_LoadBMP_RW':
/home/oguz/Downloads/ps2dev/SDL_image/IMG_bmp.c:196: undefined reference to `SDL_ReadLE32'
/home/oguz/Downloads/ps2dev/SDL_image/IMG_bmp.c:197: undefined reference to `SDL_ReadLE16'
/home/oguz/Downloads/ps2dev/SDL_image/IMG_bmp.c:198: undefined reference to `SDL_ReadLE16'
/home/oguz/Downloads/ps2dev/SDL_image/IMG_bmp.c:199: undefined reference to `SDL_ReadLE32'
/home/oguz/Downloads/ps2dev/SDL_image/IMG_bmp.c:202: undefined reference to `SDL_ReadLE32'
/home/oguz/Downloads/ps2dev/SDL_image/IMG_bmp.c:215: undefined reference to `SDL_ReadLE32'
/home/oguz/Downloads/ps2dev/SDL_image/IMG_bmp.c:216: undefined reference to `SDL_ReadLE32'
/home/oguz/Downloads/ps2dev/SDL_image/IMG_bmp.c:217: undefined reference to `SDL_ReadLE16'
/home/oguz/Downloads/ps2dev/SDL_image/IMG_bmp.c:218: undefined reference to `SDL_ReadLE16'
/home/oguz/Downloads/ps2dev/SDL_image/IMG_bmp.c:219: undefined reference to `SDL_ReadLE32'
/home/oguz/Downloads/ps2dev/SDL_image/IMG_bmp.c:220: undefined reference to `SDL_ReadLE32'
/home/oguz/Downloads/ps2dev/SDL_image/IMG_bmp.c:221: undefined reference to `SDL_ReadLE32'
/home/oguz/Downloads/ps2dev/SDL_image/IMG_bmp.c:222: undefined reference to `SDL_ReadLE32'
/home/oguz/Downloads/ps2dev/SDL_image/IMG_bmp.c:223: undefined reference to `SDL_ReadLE32'
/usr/local/pspdev/psp/lib/libSDL_image.a(IMG_bmp.o):/home/oguz/Downloads/ps2dev/SDL_image/IMG_bmp.c:224: more undefined references to `SDL_ReadLE32' follow
/usr/local/pspdev/psp/lib/libSDL_image.a(IMG_bmp.o): In function `IMG_LoadBMP_RW':
/home/oguz/Downloads/ps2dev/SDL_image/IMG_bmp.c:204: undefined reference to `SDL_ReadLE16'
/home/oguz/Downloads/ps2dev/SDL_image/IMG_bmp.c:205: undefined reference to `SDL_ReadLE16'
/home/oguz/Downloads/ps2dev/SDL_image/IMG_bmp.c:206: undefined reference to `SDL_ReadLE16'
/home/oguz/Downloads/ps2dev/SDL_image/IMG_bmp.c:207: undefined reference to `SDL_ReadLE16'
/usr/local/pspdev/psp/lib/libSDL_image.a(IMG_jpg.o): In function `IMG_LoadJPG_RW':
/home/oguz/Downloads/ps2dev/SDL_image/IMG_jpg.c:206: undefined reference to `jpeg_std_error'
/home/oguz/Downloads/ps2dev/SDL_image/IMG_jpg.c:217: undefined reference to `jpeg_CreateDecompress'
/home/oguz/Downloads/ps2dev/SDL_image/IMG_jpg.c:169: undefined reference to `jpeg_resync_to_restart'
/home/oguz/Downloads/ps2dev/SDL_image/IMG_jpg.c:169: undefined reference to `jpeg_resync_to_restart'
/home/oguz/Downloads/ps2dev/SDL_image/IMG_jpg.c:219: undefined reference to `jpeg_read_header'
/home/oguz/Downloads/ps2dev/SDL_image/IMG_jpg.c:230: undefined reference to `jpeg_calc_output_dimensions'
/home/oguz/Downloads/ps2dev/SDL_image/IMG_jpg.c:247: undefined reference to `jpeg_start_decompress'
/home/oguz/Downloads/ps2dev/SDL_image/IMG_jpg.c:251: undefined reference to `jpeg_read_scanlines'
/home/oguz/Downloads/ps2dev/SDL_image/IMG_jpg.c:253: undefined reference to `jpeg_finish_decompress'
/home/oguz/Downloads/ps2dev/SDL_image/IMG_jpg.c:257: undefined reference to `jpeg_destroy_decompress'
/home/oguz/Downloads/ps2dev/SDL_image/IMG_jpg.c:211: undefined reference to `jpeg_destroy_decompress'
/usr/local/pspdev/psp/lib/libSDL_image.a(IMG_png.o): In function `IMG_LoadPNG_RW':
/home/oguz/Downloads/ps2dev/SDL_image/IMG_png.c:123: undefined reference to `png_create_read_struct'
/home/oguz/Downloads/ps2dev/SDL_image/IMG_png.c:131: undefined reference to `png_create_info_struct'
/home/oguz/Downloads/ps2dev/SDL_image/IMG_png.c:281: undefined reference to `png_destroy_read_struct'
/home/oguz/Downloads/ps2dev/SDL_image/IMG_png.c:147: undefined reference to `png_set_read_fn'
/home/oguz/Downloads/ps2dev/SDL_image/IMG_png.c:150: undefined reference to `png_read_info'
/home/oguz/Downloads/ps2dev/SDL_image/IMG_png.c:151: undefined reference to `png_get_IHDR'
/home/oguz/Downloads/ps2dev/SDL_image/IMG_png.c:155: undefined reference to `png_set_strip_16'
/home/oguz/Downloads/ps2dev/SDL_image/IMG_png.c:160: undefined reference to `png_set_packing'
/home/oguz/Downloads/ps2dev/SDL_image/IMG_png.c:169: undefined reference to `png_get_valid'
/home/oguz/Downloads/ps2dev/SDL_image/IMG_png.c:198: undefined reference to `png_read_update_info'
/home/oguz/Downloads/ps2dev/SDL_image/IMG_png.c:200: undefined reference to `png_get_IHDR'
/home/oguz/Downloads/ps2dev/SDL_image/IMG_png.c:250: undefined reference to `png_read_image'
/home/oguz/Downloads/ps2dev/SDL_image/IMG_png.c:172: undefined reference to `png_get_tRNS'
/home/oguz/Downloads/ps2dev/SDL_image/IMG_png.c:164: undefined reference to `png_set_expand'
/home/oguz/Downloads/ps2dev/SDL_image/IMG_png.c:196: undefined reference to `png_set_gray_to_rgb'
/home/oguz/Downloads/ps2dev/SDL_image/IMG_png.c:189: undefined reference to `png_set_expand'
/usr/local/pspdev/psp/lib/libSDL_image.a(IMG_png.o): In function `png_read_data':
/home/oguz/Downloads/ps2dev/SDL_image/IMG_png.c:94: undefined reference to `png_get_io_ptr'
/usr/local/pspdev/psp/lib/libSDL_image.a(IMG_png.o): In function `IMG_isPNG':
/home/oguz/Downloads/ps2dev/SDL_image/IMG_png.c:86: undefined reference to `png_sig_cmp'
/usr/local/pspdev/psp/lib/libSDL_mixer.a(mixer.o): In function `Mix_LoadWAV_RW':
/home/oguz/Downloads/ps2dev/SDL_mixer/mixer.c:426: undefined reference to `SDL_ReadLE32'
/home/oguz/Downloads/ps2dev/SDL_mixer/mixer.c:482: undefined reference to `SDL_FreeWAV'
/home/oguz/Downloads/ps2dev/SDL_mixer/mixer.c:433: undefined reference to `SDL_LoadWAV_RW'
/home/oguz/Downloads/ps2dev/SDL_mixer/mixer.c:477: undefined reference to `SDL_FreeWAV'
/usr/local/pspdev/psp/lib/libSDL_mixer.a(mixer.o): In function `mix_channels':
/home/oguz/Downloads/ps2dev/SDL_mixer/mixer.c:207: undefined reference to `SDL_MixAudio'
/home/oguz/Downloads/ps2dev/SDL_mixer/mixer.c:231: undefined reference to `SDL_MixAudio'
/usr/local/pspdev/psp/lib/libSDL_mixer.a(wavestream.o): In function `WAVStream_PlaySome':
/home/oguz/Downloads/ps2dev/SDL_mixer/wavestream.c:196: undefined reference to `SDL_MixAudio'
/usr/local/pspdev/psp/lib/libSDL_mixer.a(wavestream.o): In function `ReadChunk':
/home/oguz/Downloads/ps2dev/SDL_mixer/wavestream.c:241: undefined reference to `SDL_ReadLE32'
/home/oguz/Downloads/ps2dev/SDL_mixer/wavestream.c:242: undefined reference to `SDL_ReadLE32'
/usr/local/pspdev/psp/lib/libSDL_mixer.a(wavestream.o): In function `WAVStream_LoadSong':
/home/oguz/Downloads/ps2dev/SDL_mixer/wavestream.c:290: undefined reference to `SDL_ReadLE32'
/home/oguz/Downloads/ps2dev/SDL_mixer/wavestream.c:291: undefined reference to `SDL_ReadLE32'
/home/oguz/Downloads/ps2dev/SDL_mixer/wavestream.c:292: undefined reference to `SDL_ReadLE32'
/usr/local/pspdev/psp/lib/libSDL_mixer.a(wavestream.o):/home/oguz/Downloads/ps2dev/SDL_mixer/wavestream.c:441: more undefined references to `SDL_ReadLE32' follow
/usr/local/pspdev/psp/lib/libSDL_mixer.a(wavestream.o): In function `WAVStream_LoadSong':
/home/oguz/Downloads/ps2dev/SDL_mixer/wavestream.c:442: undefined reference to `SDL_ReadBE32'
/home/oguz/Downloads/ps2dev/SDL_mixer/wavestream.c:443: undefined reference to `SDL_ReadLE32'
/home/oguz/Downloads/ps2dev/SDL_mixer/wavestream.c:461: undefined reference to `SDL_ReadLE32'
/home/oguz/Downloads/ps2dev/SDL_mixer/wavestream.c:462: undefined reference to `SDL_ReadBE32'
/home/oguz/Downloads/ps2dev/SDL_mixer/wavestream.c:472: undefined reference to `SDL_ReadBE32'
/home/oguz/Downloads/ps2dev/SDL_mixer/wavestream.c:473: undefined reference to `SDL_ReadBE32'
/home/oguz/Downloads/ps2dev/SDL_mixer/wavestream.c:481: undefined reference to `SDL_ReadBE16'
/home/oguz/Downloads/ps2dev/SDL_mixer/wavestream.c:482: undefined reference to `SDL_ReadBE32'
/home/oguz/Downloads/ps2dev/SDL_mixer/wavestream.c:483: undefined reference to `SDL_ReadBE16'
/usr/local/pspdev/psp/lib/libSDL_mixer.a(instrum.o): In function `load_instrument':
/home/oguz/Downloads/ps2dev/SDL_mixer/timidity/instrum.c:524: undefined reference to `pow'
/usr/local/pspdev/psp/lib/libSDL_mixer.a(resample.o): In function `update_vibrato':
/home/oguz/Downloads/ps2dev/SDL_mixer/timidity/resample.c:349: undefined reference to `sin'
/usr/local/pspdev/psp/lib/libSDL_mixer.a(load_aiff.o): In function `Mix_LoadAIFF_RW':
/home/oguz/Downloads/ps2dev/SDL_mixer/load_aiff.c:104: undefined reference to `SDL_ReadLE32'
/home/oguz/Downloads/ps2dev/SDL_mixer/load_aiff.c:105: undefined reference to `SDL_ReadBE32'
/home/oguz/Downloads/ps2dev/SDL_mixer/load_aiff.c:111: undefined reference to `SDL_ReadLE32'
/home/oguz/Downloads/ps2dev/SDL_mixer/load_aiff.c:127: undefined reference to `SDL_ReadLE32'
/home/oguz/Downloads/ps2dev/SDL_mixer/load_aiff.c:128: undefined reference to `SDL_ReadBE32'
/home/oguz/Downloads/ps2dev/SDL_mixer/load_aiff.c:144: undefined reference to `SDL_ReadBE16'
/home/oguz/Downloads/ps2dev/SDL_mixer/load_aiff.c:145: undefined reference to `SDL_ReadBE32'
/home/oguz/Downloads/ps2dev/SDL_mixer/load_aiff.c:146: undefined reference to `SDL_ReadBE16'
/home/oguz/Downloads/ps2dev/SDL_mixer/load_aiff.c:137: undefined reference to `SDL_ReadBE32'
/home/oguz/Downloads/ps2dev/SDL_mixer/load_aiff.c:138: undefined reference to `SDL_ReadBE32'
/home/oguz/Downloads/ps2dev/SDL_mixer/load_aiff.c:158: undefined reference to `SDL_ReadBE32'
/home/oguz/Downloads/ps2dev/SDL_mixer/load_aiff.c:159: undefined reference to `SDL_ReadBE32'
/home/oguz/Downloads/ps2dev/SDL_mixer/load_aiff.c:160: undefined reference to `SDL_ReadBE32'
/home/oguz/Downloads/ps2dev/SDL_mixer/load_aiff.c:161: undefined reference to `SDL_ReadBE16'
/usr/local/pspdev/psp/lib/libSDL_mixer.a(mix.o): In function `update_tremolo':
/home/oguz/Downloads/ps2dev/SDL_mixer/timidity/mix.c:188: undefined reference to `sin'
/usr/local/pspdev/psp/lib/libSDL_mixer.a(filter.o): In function `designfir':
/home/oguz/Downloads/ps2dev/SDL_mixer/timidity/filter.c:88: undefined reference to `sin'
/home/oguz/Downloads/ps2dev/SDL_mixer/timidity/filter.c:92: undefined reference to `log'
/home/oguz/Downloads/ps2dev/SDL_mixer/timidity/filter.c:92: undefined reference to `exp'
/usr/local/pspdev/psp/lib/libSDL_mixer.a(filter.o): In function `kaiser':
/home/oguz/Downloads/ps2dev/SDL_mixer/timidity/filter.c:70: undefined reference to `sqrt'
collect2: ld returned 1 exit status
make: *** [engine.elf] Error 1


sdl-config --libs gives this:

Code:

-L/usr/lib -lSDL


which i think is wrong. It should point to the pspdev lib afaik. Any idea what it could be? Thanks for the help so far!
Back to top
View user's profile Send private message
danzel



Joined: 04 Nov 2005
Posts: 182

PostPosted: Sun Dec 09, 2007 1:09 pm    Post subject: Reply with quote

sdl-config doesn't work on the psp.

My messy libs look like this:

Code:
LIBS= -lSDL_image -lSDL_mixer -lSDL -lGLU -lGL  -lpng -ljpeg -lz -lm -lstdc++ -lc -lc -lpsputility -lpspdebug -lpspgu -lpspge -lpspdisplay -lpspctrl -lpspvfpu -lpspuser -lpsprtc -lpsppower -lpspdebug -lpspge -lpspaudio -lpspctrl -lpspnet -lpspnet_inet -lpspnet_apctl -lpspnet_resolver -lpsputility -lpspuser -lpsphprm -lpspsdk


So, try something like it ;-) The first bit should be all you need.
Back to top
View user's profile Send private message
Oguz286



Joined: 30 Oct 2007
Posts: 35

PostPosted: Sun Dec 09, 2007 9:42 pm    Post subject: Reply with quote

danzel wrote:
sdl-config doesn't work on the psp.

My messy libs look like this:

Code:
LIBS= -lSDL_image -lSDL_mixer -lSDL -lGLU -lGL  -lpng -ljpeg -lz -lm -lstdc++ -lc -lc -lpsputility -lpspdebug -lpspgu -lpspge -lpspdisplay -lpspctrl -lpspvfpu -lpspuser -lpsprtc -lpsppower -lpspdebug -lpspge -lpspaudio -lpspctrl -lpspnet -lpspnet_inet -lpspnet_apctl -lpspnet_resolver -lpsputility -lpspuser -lpsphprm -lpspsdk


So, try something like it ;-) The first bit should be all you need.


Hmm i didn't know sdl-config didn't work. Anyway, my code almost compiled. I got an error "undefined reference to main" but i read somewhere on the forums that i must include 'extern "c"' so i did that, but it still doesn't compile (although i have a lot less errors!):

With extern "C":
Code:

 make
psp-g++ -I. -I/usr/local/pspdev/psp/sdk/include -O2 -G0 -Wall -I/usr/local/pspdev/psp/include/SDL -Dmain=SDL_main -I. -I/usr/local/pspdev/psp/sdk/include -O2 -G0 -Wall -I/usr/local/pspdev/psp/include/SDL -Dmain=SDL_main -fno-exceptions -fno-rtti -D_PSP_FW_VERSION=371   -c -o main.o main.cpp
main.cpp: In function ‘int SDL_main(int, char**)’:
main.cpp:81: warning: unused variable ‘musId0’
psp-gcc -I. -I/usr/local/pspdev/psp/sdk/include -O2 -G0 -Wall -I/usr/local/pspdev/psp/include/SDL -Dmain=SDL_main -D_PSP_FW_VERSION=371  -L. -L/usr/local/pspdev/psp/sdk/lib -specs=/usr/local/pspdev/psp/sdk/lib/prxspecs -Wl,-q,-T/usr/local/pspdev/psp/sdk/lib/linkfile.prx   main.o globals/globals.o globals/Timer.o sound/Sound.o sound/SoundEffect.o sound/Music.o graphics/Texture.o graphics/StaticTexture.o graphics/Animation.o graphics/TextureManager.o /usr/local/pspdev/psp/sdk/lib/prxexports.o -lSDL_image -lSDL_mixer -lSDL -lpng -ljpeg -lz -lm -lstdc++ -lc -lc -lpsputility -lpspdebug -lpspgu -lpspge -lpspdisplay -lpspctrl -lpspvfpu -lpspuser -lpsprtc -lpsppower -lpspdebug -lpspge -lpspaudio -lpspctrl -lpspnet -lpspnet_inet -lpspnet_apctl -lpspnet_resolver -lpsputility -lpspuser -lpsphprm -lpspsdk -lpspdebug -lpspdisplay -lpspge -lpspctrl -lpspsdk -lc -lpspnet -lpspnet_inet -lpspnet_apctl -lpspnet_resolver -lpsputility -lpspuser -lpspkernel -o engine.elf
/usr/local/pspdev/lib/gcc/psp/4.1.0/../../../../psp/lib/crt0_prx.o: In function `_main':
/home/oguz/Downloads/ps2dev/psptoolchain/build/pspsdk/src/startup/crt0_prx.c:91: undefined reference to `main'
/usr/local/pspdev/psp/sdk/lib/prxexports.o:(.rodata.sceResident+0xc): undefined reference to `module_info'
collect2: ld returned 1 exit status
make: *** [engine.elf] Error 1


Without extern "C":
Code:

 make
psp-g++ -I. -I/usr/local/pspdev/psp/sdk/include -O2 -G0 -Wall -I/usr/local/pspdev/psp/include/SDL -Dmain=SDL_main -I. -I/usr/local/pspdev/psp/sdk/include -O2 -G0 -Wall -I/usr/local/pspdev/psp/include/SDL -Dmain=SDL_main -fno-exceptions -fno-rtti -D_PSP_FW_VERSION=371   -c -o main.o main.cpp
main.cpp: In function ‘int SDL_main(int, char**)’:
main.cpp:81: warning: unused variable ‘musId0’
psp-gcc -I. -I/usr/local/pspdev/psp/sdk/include -O2 -G0 -Wall -I/usr/local/pspdev/psp/include/SDL -Dmain=SDL_main -D_PSP_FW_VERSION=371  -L. -L/usr/local/pspdev/psp/sdk/lib -specs=/usr/local/pspdev/psp/sdk/lib/prxspecs -Wl,-q,-T/usr/local/pspdev/psp/sdk/lib/linkfile.prx   main.o globals/globals.o globals/Timer.o sound/Sound.o sound/SoundEffect.o sound/Music.o graphics/Texture.o graphics/StaticTexture.o graphics/Animation.o graphics/TextureManager.o /usr/local/pspdev/psp/sdk/lib/prxexports.o -lSDL_image -lSDL_mixer -lSDL -lpng -ljpeg -lz -lm -lstdc++ -lc -lc -lpsputility -lpspdebug -lpspgu -lpspge -lpspdisplay -lpspctrl -lpspvfpu -lpspuser -lpsprtc -lpsppower -lpspdebug -lpspge -lpspaudio -lpspctrl -lpspnet -lpspnet_inet -lpspnet_apctl -lpspnet_resolver -lpsputility -lpspuser -lpsphprm -lpspsdk -lpspdebug -lpspdisplay -lpspge -lpspctrl -lpspsdk -lc -lpspnet -lpspnet_inet -lpspnet_apctl -lpspnet_resolver -lpsputility -lpspuser -lpspkernel -o engine.elf
/usr/local/pspdev/lib/gcc/psp/4.1.0/../../../../psp/lib/crt0_prx.o: In function `_main':
/home/oguz/Downloads/ps2dev/psptoolchain/build/pspsdk/src/startup/crt0_prx.c:91: undefined reference to `main'
/usr/local/pspdev/psp/sdk/lib/prxexports.o:(.rodata.sceResident+0xc): undefined reference to `module_info'
collect2: ld returned 1 exit status
make: *** [engine.elf] Error 1


As you can see, the errors are the same, so that didn't work. The documentation of SDL for the psp tells me that i should write my app just like any other app and SDL_main will take care of the callbacks and stuff like that for me. So here's the beginning of my main.cpp:

Code:

#include "./globals/globals.h"

//extern "C"
int main ( int argc, char** argv )
{
    // initialize SDL video
    if ( SDL_Init( SDL_INIT_EVERYTHING ) < 0 )
    {
        printf( "Unable to init SDL: %s\n", SDL_GetError() );
        return 1;
    }

   if(Mix_OpenAudio(22050, MIX_DEFAULT_FORMAT, 2, 4096) == -1) {
      printf("Unable to init audio.\n");
      return 1;
   }

    // make sure SDL cleans up before exit
    atexit(SDL_Quit);

    // create a new window
    SDL_Surface* screen = SDL_SetVideoMode(640, 480, 16,
                                           SDL_HWSURFACE|SDL_DOUBLEBUF);
    if ( !screen )
    {
        printf("Unable to set 640x480 video: %s\n", SDL_GetError());
        return 1;
    }
...
...


Thanks for the help, i really appreciate it! Btw, i'm using the search function to find similar problems but i always get the same result whatever the searchstring is. Am i doing something wrong here?
Back to top
View user's profile Send private message
Oguz286



Joined: 30 Oct 2007
Posts: 35

PostPosted: Mon Dec 10, 2007 12:06 am    Post subject: Reply with quote

Allright, i started all over. I removed everything PSP related from laptop (i'm running ubuntu 7.10 btw) and followed these steps that J.F. explained so well to build a clean toolchain and libraries:

http://forums.ps2dev.org/viewtopic.php?t=9351&postdays=0&postorder=asc&highlight=prxexports&start=30

Everthing compiled fine and i saw no errors (i outputted evertything to a log file and i searched the entire file for errors and there were none). So i should not have a problem with an unclean toolchain.

The makefile i'm using:

Code:

TARGET = engine
OBJS = main.o globals/globals.o globals/Timer.o sound/Sound.o sound/SoundEffect.o sound/Music.o graphics/Texture.o graphics/StaticTexture.o graphics/Animation.o graphics/TextureManager.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 = OguEngine
PSP_DIR_NAME = OguEngine
BUILD_PRX = 1
PSP_FW_VERSION = 371

PSPSDK=$(shell psp-config --pspsdk-path)
PSPBIN = $(PSPSDK)/../bin
CFLAGS += $(shell $(PSPBIN)/sdl-config --cflags)
LIBS= -lSDL_image -lSDL_mixer -lSDL -lGLU -lGL  -lpng -ljpeg -lz -lm -lstdc++ -lc -lpsputility -lpspdebug -lpspgu -lpspge -lpspdisplay -lpspctrl -lpspvfpu -lpspuser -lpsprtc -lpsppower -lpspdebug -lpspge -lpspaudio -lpspctrl -lpspnet -lpspnet_inet -lpspnet_apctl -lpspnet_resolver -lpsputility -lpspuser -lpsphprm -lpspsdk
include $(PSPSDK)/lib/build.mak


And here is the output:

Code:

make
psp-g++ -I. -I/usr/local/pspdev/psp/sdk/include -O2 -G0 -Wall -I/usr/local/pspdev/psp/include/SDL -Dmain=SDL_main -I. -I/usr/local/pspdev/psp/sdk/include -O2 -G0 -Wall -I/usr/local/pspdev/psp/include/SDL -Dmain=SDL_main -fno-exceptions -fno-rtti -D_PSP_FW_VERSION=371   -c -o main.o main.cpp
main.cpp: In function ‘int SDL_main(int, char**)’:
main.cpp:81: warning: unused variable ‘musId0’
psp-gcc -I. -I/usr/local/pspdev/psp/sdk/include -O2 -G0 -Wall -I/usr/local/pspdev/psp/include/SDL -Dmain=SDL_main -D_PSP_FW_VERSION=371  -L. -L/usr/local/pspdev/psp/sdk/lib -specs=/usr/local/pspdev/psp/sdk/lib/prxspecs -Wl,-q,-T/usr/local/pspdev/psp/sdk/lib/linkfile.prx   main.o globals/globals.o globals/Timer.o sound/Sound.o sound/SoundEffect.o sound/Music.o graphics/Texture.o graphics/StaticTexture.o graphics/Animation.o graphics/TextureManager.o /usr/local/pspdev/psp/sdk/lib/prxexports.o -lSDL_image -lSDL_mixer -lSDL -lGLU -lGL  -lpng -ljpeg -lz -lm -lstdc++ -lc -lpsputility -lpspdebug -lpspgu -lpspge -lpspdisplay -lpspctrl -lpspvfpu -lpspuser -lpsprtc -lpsppower -lpspdebug -lpspge -lpspaudio -lpspctrl -lpspnet -lpspnet_inet -lpspnet_apctl -lpspnet_resolver -lpsputility -lpspuser -lpsphprm -lpspsdk -lpspdebug -lpspdisplay -lpspge -lpspctrl -lpspsdk -lc -lpspnet -lpspnet_inet -lpspnet_apctl -lpspnet_resolver -lpsputility -lpspuser -lpspkernel -o engine.elf
/usr/local/pspdev/lib/gcc/psp/4.1.0/../../../../psp/lib/crt0_prx.o: In function `_main':
/home/oguz/Projects/PSP/devtools/psptoolchain/build/pspsdk/src/startup/crt0_prx.c:91: undefined reference to `main'
/usr/local/pspdev/psp/sdk/lib/prxexports.o:(.rodata.sceResident+0xc): undefined reference to `module_info'
/usr/local/pspdev/lib/gcc/psp/4.1.0/../../../../psp/lib/libSDL_mixer.a(music.o): In function `music_internal_playing':
/home/oguz/Projects/PSP/devtools/psplibraries/build/SDL_mixer/music.c:1115: undefined reference to `SMPEG_status'
/usr/local/pspdev/lib/gcc/psp/4.1.0/../../../../psp/lib/libSDL_mixer.a(music.o): In function `music_internal_halt':
/home/oguz/Projects/PSP/devtools/psplibraries/build/SDL_mixer/music.c:992: undefined reference to `SMPEG_stop'
/usr/local/pspdev/lib/gcc/psp/4.1.0/../../../../psp/lib/libSDL_mixer.a(music.o): In function `music_internal_volume':
/home/oguz/Projects/PSP/devtools/psplibraries/build/SDL_mixer/music.c:924: undefined reference to `SMPEG_setvolume'
/usr/local/pspdev/lib/gcc/psp/4.1.0/../../../../psp/lib/libSDL_mixer.a(music.o): In function `music_internal_position':
/home/oguz/Projects/PSP/devtools/psplibraries/build/SDL_mixer/music.c:841: undefined reference to `SMPEG_skip'
/home/oguz/Projects/PSP/devtools/psplibraries/build/SDL_mixer/music.c:843: undefined reference to `SMPEG_rewind'
/home/oguz/Projects/PSP/devtools/psplibraries/build/SDL_mixer/music.c:844: undefined reference to `SMPEG_play'
/usr/local/pspdev/lib/gcc/psp/4.1.0/../../../../psp/lib/libSDL_mixer.a(music.o): In function `music_internal_play':
/home/oguz/Projects/PSP/devtools/psplibraries/build/SDL_mixer/music.c:750: undefined reference to `SMPEG_enableaudio'
/home/oguz/Projects/PSP/devtools/psplibraries/build/SDL_mixer/music.c:751: undefined reference to `SMPEG_enablevideo'
/home/oguz/Projects/PSP/devtools/psplibraries/build/SDL_mixer/music.c:752: undefined reference to `SMPEG_play'
/usr/local/pspdev/lib/gcc/psp/4.1.0/../../../../psp/lib/libSDL_mixer.a(music.o): In function `Mix_FreeMusic':
/home/oguz/Projects/PSP/devtools/psplibraries/build/SDL_mixer/music.c:663: undefined reference to `SMPEG_delete'
/usr/local/pspdev/lib/gcc/psp/4.1.0/../../../../psp/lib/libSDL_mixer.a(music.o): In function `Mix_LoadMUS':
/home/oguz/Projects/PSP/devtools/psplibraries/build/SDL_mixer/music.c:568: undefined reference to `SMPEG_new'
/home/oguz/Projects/PSP/devtools/psplibraries/build/SDL_mixer/music.c:573: undefined reference to `SMPEG_actualSpec'
/usr/local/pspdev/lib/gcc/psp/4.1.0/../../../../psp/lib/libSDL_mixer.a(music.o): In function `music_mixer':
/home/oguz/Projects/PSP/devtools/psplibraries/build/SDL_mixer/music.c:318: undefined reference to `SMPEG_playAudio'
/usr/local/pspdev/lib/gcc/psp/4.1.0/../../../../psp/lib/libSDL_mixer.a(music_ogg.o): In function `OGG_jump_to_time':
/home/oguz/Projects/PSP/devtools/psplibraries/build/SDL_mixer/music_ogg.c:245: undefined reference to `ov_time_seek'
/usr/local/pspdev/lib/gcc/psp/4.1.0/../../../../psp/lib/libSDL_mixer.a(music_ogg.o): In function `OGG_delete':
/home/oguz/Projects/PSP/devtools/psplibraries/build/SDL_mixer/music_ogg.c:237: undefined reference to `ov_clear'
/usr/local/pspdev/lib/gcc/psp/4.1.0/../../../../psp/lib/libSDL_mixer.a(music_ogg.o): In function `OGG_playAudio':
/home/oguz/Projects/PSP/devtools/psplibraries/build/SDL_mixer/music_ogg.c:159: undefined reference to `ov_read'
/home/oguz/Projects/PSP/devtools/psplibraries/build/SDL_mixer/music_ogg.c:173: undefined reference to `ov_info'
/usr/local/pspdev/lib/gcc/psp/4.1.0/../../../../psp/lib/libSDL_mixer.a(music_ogg.o): In function `OGG_new_RW':
/home/oguz/Projects/PSP/devtools/psplibraries/build/SDL_mixer/music_ogg.c:126: undefined reference to `ov_open_callbacks'
/usr/local/pspdev/lib/gcc/psp/4.1.0/../../../../psp/lib/libSDL_mixer.a(music_ogg.o): In function `OGG_new':
/home/oguz/Projects/PSP/devtools/psplibraries/build/SDL_mixer/music_ogg.c:74: undefined reference to `ov_open'
/usr/local/pspdev/lib/gcc/psp/4.1.0/../../../../psp/lib/libSDL_mixer.a(load_ogg.o): In function `Mix_LoadOGG_RW':
/home/oguz/Projects/PSP/devtools/psplibraries/build/SDL_mixer/load_ogg.c:93: undefined reference to `ov_open_callbacks'
/home/oguz/Projects/PSP/devtools/psplibraries/build/SDL_mixer/load_ogg.c:101: undefined reference to `ov_info'
/home/oguz/Projects/PSP/devtools/psplibraries/build/SDL_mixer/load_ogg.c:112: undefined reference to `ov_pcm_total'
/home/oguz/Projects/PSP/devtools/psplibraries/build/SDL_mixer/load_ogg.c:122: undefined reference to `ov_read'
/home/oguz/Projects/PSP/devtools/psplibraries/build/SDL_mixer/load_ogg.c:128: undefined reference to `ov_read'
/home/oguz/Projects/PSP/devtools/psplibraries/build/SDL_mixer/load_ogg.c:140: undefined reference to `ov_clear'
/usr/local/pspdev/lib/gcc/psp/4.1.0/../../../../psp/lib/libSDL.a(SDL_pspevents.o): In function `PSP_EventQuit':
/home/oguz/Projects/PSP/devtools/psplibraries/build/SDL/src/video/psp/SDL_pspevents.c:274: undefined reference to `pspIrKeybFinish'
/usr/local/pspdev/lib/gcc/psp/4.1.0/../../../../psp/lib/libSDL.a(SDL_pspevents.o): In function `PSP_EventInit':
/home/oguz/Projects/PSP/devtools/psplibraries/build/SDL/src/video/psp/SDL_pspevents.c:247: undefined reference to `pspIrKeybInit'
/home/oguz/Projects/PSP/devtools/psplibraries/build/SDL/src/video/psp/SDL_pspevents.c:249: undefined reference to `pspIrKeybOutputMode'
/usr/local/pspdev/lib/gcc/psp/4.1.0/../../../../psp/lib/libSDL.a(SDL_pspevents.o): In function `PSP_PumpEvents':
/home/oguz/Projects/PSP/devtools/psplibraries/build/SDL/src/video/psp/SDL_pspevents.c:112: undefined reference to `pspIrKeybReadinput'
collect2: ld returned 1 exit status
make: *** [engine.elf] Error 1


I'm really lost here. Before i started all over again i had 2 errors, now i have a bunch of them. I'm guessing that it has something to do with the positions of the libs i include, because when i change the positions i get different errors, but none of them are error free.

I also tried the contents of /trunk/tests/SDL/ and that works fine. Also the samples included in the sdk compile and run fine so i guess i'm doing something wrong, but i just figure out what. Can someone shed some light on this?

[EDIT] I'm not a linux guru, but why is my svn directory (~/Projects/PSP/devtools/*) being referred to? The compiled libraries are in the /usr/local/pspdev/* folder. Is this normal?
Back to top
View user's profile Send private message
CpuWhiz



Joined: 04 Jun 2007
Posts: 42

PostPosted: Mon Dec 10, 2007 1:22 am    Post subject: Reply with quote

That is where the source file was when you (more like the psplibraries script) compiled the library. It gets added in as debug info to tell you line numbers. That is why it mentions that directory in the errors.

It sounds like you have your main error again. I don't use SDL for my PSP apps, but I am using it for creating a OpenGL window on the PC side and my main function looks like this:
Code:
#ifdef __cplusplus
extern "C" {
#endif

int main(int argc, char *argv[])
{
        gameInit(argc, argv);
        gameMainLoop();

        return 0;
};

#ifdef __cplusplus
}
#endif


It seems to be shut up when I do this. The source file it is in is C++ with a cpp extension so I don't need the ifdef blocks, but I put them there out of habit.

Check you are not missing -lpspirkeyb
You are getting close, the rest of them are SDL_mixer and it's missing dependencies. I see you have SDL_mixer in the list so I am not sure why you are getting some of those (could be the order, try SDL_mixer after SDL), but the ov_read, etc. are for ogg. That one is -logg and maybe -lvorbis (not sure if you need that).
Back to top
View user's profile Send private message
Oguz286



Joined: 30 Oct 2007
Posts: 35

PostPosted: Mon Dec 10, 2007 1:34 am    Post subject: Reply with quote

CpuWhiz wrote:
That is where the source file was when you (more like the psplibraries script) compiled the library. It gets added in as debug info to tell you line numbers. That is why it mentions that directory in the errors.

It sounds like you have your main error again. I don't use SDL for my PSP apps, but I am using it for creating a OpenGL window on the PC side and my main function looks like this:
Code:
#ifdef __cplusplus
extern "C" {
#endif

int main(int argc, char *argv[])
{
        gameInit(argc, argv);
        gameMainLoop();

        return 0;
};

#ifdef __cplusplus
}
#endif


It seems to be shut up when I do this. The source file it is in is C++ with a cpp extension so I don't need the ifdef blocks, but I put them there out of habit.

Check you are not missing -lpspirkeyb
You are getting close, the rest of them are SDL_mixer and it's missing dependencies. I see you have SDL_mixer in the list so I am not sure why you are getting some of those (could be the order, try SDL_mixer after SDL), but the ov_read, etc. are for ogg. That one is -logg and maybe -lvorbis (not sure if you need that).


Thanks for your reply! About the -logg and -lvorbis... i tried them but to no avail.

The pspirkeyb library should do the trick (i'm recompiling everything at the moment, *again*) but when i tried compiling the psplibraries i got an error, so i guess not everything went great. I'll try your suggestions when it's done compiling.

About the extern "C"-bit, do i have to do that to all my .cpp files? Because the rest of the files are compiled without problems, although my main is also getting compiled without problems. Linking all the stuff together on the other hand...
Back to top
View user's profile Send private message
CpuWhiz



Joined: 04 Jun 2007
Posts: 42

PostPosted: Mon Dec 10, 2007 1:49 am    Post subject: Reply with quote

No, just the main function. It's expecting the main function to be a C symbol and not a C++ symbol, but everything else wouldn't be referenced by other libraries, so they don't need it (unless you get a weird linker error for them). I am rebuilding my ubuntu gutsy package that includes psptoolchain, psplibraries, prxtool, etc. right now. I am also uploading my old version to rapidshare (made on 2007-10-19). If you are interested in trying with my package let me know. You could have my build script if you really want it. Keep in mind my upload is not very fast. I have never had problems with the setup contained in my package. I build it with a clean install of gutsy and run it on my feisty system (have not upgraded yet, and don't use compiz anyway).
Back to top
View user's profile Send private message
Oguz286



Joined: 30 Oct 2007
Posts: 35

PostPosted: Mon Dec 10, 2007 2:03 am    Post subject: Reply with quote

CpuWhiz wrote:
No, just the main function. It's expecting the main function to be a C symbol and not a C++ symbol, but everything else wouldn't be referenced by other libraries, so they don't need it (unless you get a weird linker error for them). I am rebuilding my ubuntu gutsy package that includes psptoolchain, psplibraries, prxtool, etc. right now. I am also uploading my old version to rapidshare (made on 2007-10-19). If you are interested in trying with my package let me know. You could have my build script if you really want it. Keep in mind my upload is not very fast. I have never had problems with the setup contained in my package. I build it with a clean install of gutsy and run it on my feisty system (have not upgraded yet, and don't use compiz anyway).


I would gladly want to try out your package :) If you could send it to me, i could host it on my site. This way i can find out if the error is the human factor (ie. me) or the psptoolchain and libraries (which compile fine).

Well everything is setup without errors, but i'm still getting errors:

Code:

make
psp-gcc -I. -I/usr/local/pspdev/psp/sdk/include -O2 -G0 -Wall -I/usr/local/pspdev/psp/include/SDL -Dmain=SDL_main -D_PSP_FW_VERSION=371  -L. -L/usr/local/pspdev/psp/sdk/lib -specs=/usr/local/pspdev/psp/sdk/lib/prxspecs -Wl,-q,-T/usr/local/pspdev/psp/sdk/lib/linkfile.prx   main.o globals/globals.o globals/Timer.o sound/Sound.o sound/SoundEffect.o sound/Music.o graphics/Texture.o graphics/StaticTexture.o graphics/Animation.o graphics/TextureManager.o /usr/local/pspdev/psp/sdk/lib/prxexports.o -lSDLmain -lSDL -lSDL_image -lSDL_mixer -lGLU -lGL -lpng -ljpeg -lz -lm -lstdc++ -lc -lpsputility -lpspdebug -lpspgu -lpspge -lpspdisplay -lpspctrl -lpspvfpu -lpspuser -lpsprtc -lpsppower -lpspdebug -lpspge -lpspaudio -lpspctrl -lpspnet -lpspnet_inet -lpspnet_apctl -lpspnet_resolver -lpsputility -lpspuser -lpsphprm -lpspirkeyb -lpspsdk -logg -lvorbis -lpspdebug -lpspdisplay -lpspge -lpspctrl -lpspsdk -lc -lpspnet -lpspnet_inet -lpspnet_apctl -lpspnet_resolver -lpsputility -lpspuser -lpspkernel -o engine.elf
/usr/local/pspdev/lib/gcc/psp/4.1.0/../../../../psp/lib/libSDL_image.a(IMG_bmp.o): In function `IMG_LoadBMP_RW':
/home/oguz/Projects/PSP/devtools/psplibraries/build/SDL_image/IMG_bmp.c:196: undefined reference to `SDL_ReadLE32'
/home/oguz/Projects/PSP/devtools/psplibraries/build/SDL_image/IMG_bmp.c:197: undefined reference to `SDL_ReadLE16'
/home/oguz/Projects/PSP/devtools/psplibraries/build/SDL_image/IMG_bmp.c:198: undefined reference to `SDL_ReadLE16'
/home/oguz/Projects/PSP/devtools/psplibraries/build/SDL_image/IMG_bmp.c:199: undefined reference to `SDL_ReadLE32'
/home/oguz/Projects/PSP/devtools/psplibraries/build/SDL_image/IMG_bmp.c:202: undefined reference to `SDL_ReadLE32'
/home/oguz/Projects/PSP/devtools/psplibraries/build/SDL_image/IMG_bmp.c:215: undefined reference to `SDL_ReadLE32'
/home/oguz/Projects/PSP/devtools/psplibraries/build/SDL_image/IMG_bmp.c:216: undefined reference to `SDL_ReadLE32'
/home/oguz/Projects/PSP/devtools/psplibraries/build/SDL_image/IMG_bmp.c:217: undefined reference to `SDL_ReadLE16'
/home/oguz/Projects/PSP/devtools/psplibraries/build/SDL_image/IMG_bmp.c:218: undefined reference to `SDL_ReadLE16'
/home/oguz/Projects/PSP/devtools/psplibraries/build/SDL_image/IMG_bmp.c:219: undefined reference to `SDL_ReadLE32'
/home/oguz/Projects/PSP/devtools/psplibraries/build/SDL_image/IMG_bmp.c:220: undefined reference to `SDL_ReadLE32'
/home/oguz/Projects/PSP/devtools/psplibraries/build/SDL_image/IMG_bmp.c:221: undefined reference to `SDL_ReadLE32'
/home/oguz/Projects/PSP/devtools/psplibraries/build/SDL_image/IMG_bmp.c:222: undefined reference to `SDL_ReadLE32'
/home/oguz/Projects/PSP/devtools/psplibraries/build/SDL_image/IMG_bmp.c:223: undefined reference to `SDL_ReadLE32'
/usr/local/pspdev/lib/gcc/psp/4.1.0/../../../../psp/lib/libSDL_image.a(IMG_bmp.o):/home/oguz/Projects/PSP/devtools/psplibraries/build/SDL_image/IMG_bmp.c:224: more undefined references to `SDL_ReadLE32' follow
/usr/local/pspdev/lib/gcc/psp/4.1.0/../../../../psp/lib/libSDL_image.a(IMG_bmp.o): In function `IMG_LoadBMP_RW':
/home/oguz/Projects/PSP/devtools/psplibraries/build/SDL_image/IMG_bmp.c:204: undefined reference to `SDL_ReadLE16'
/home/oguz/Projects/PSP/devtools/psplibraries/build/SDL_image/IMG_bmp.c:205: undefined reference to `SDL_ReadLE16'
/home/oguz/Projects/PSP/devtools/psplibraries/build/SDL_image/IMG_bmp.c:206: undefined reference to `SDL_ReadLE16'
/home/oguz/Projects/PSP/devtools/psplibraries/build/SDL_image/IMG_bmp.c:207: undefined reference to `SDL_ReadLE16'
/usr/local/pspdev/lib/gcc/psp/4.1.0/../../../../psp/lib/libSDL_mixer.a(mixer.o): In function `Mix_LoadWAV_RW':
/home/oguz/Projects/PSP/devtools/psplibraries/build/SDL_mixer/mixer.c:426: undefined reference to `SDL_ReadLE32'
/home/oguz/Projects/PSP/devtools/psplibraries/build/SDL_mixer/mixer.c:433: undefined reference to `SDL_LoadWAV_RW'
/home/oguz/Projects/PSP/devtools/psplibraries/build/SDL_mixer/mixer.c:482: undefined reference to `SDL_FreeWAV'
/home/oguz/Projects/PSP/devtools/psplibraries/build/SDL_mixer/mixer.c:477: undefined reference to `SDL_FreeWAV'
/usr/local/pspdev/lib/gcc/psp/4.1.0/../../../../psp/lib/libSDL_mixer.a(mixer.o): In function `mix_channels':
/home/oguz/Projects/PSP/devtools/psplibraries/build/SDL_mixer/mixer.c:207: undefined reference to `SDL_MixAudio'
/home/oguz/Projects/PSP/devtools/psplibraries/build/SDL_mixer/mixer.c:231: undefined reference to `SDL_MixAudio'
/usr/local/pspdev/lib/gcc/psp/4.1.0/../../../../psp/lib/libSDL_mixer.a(music.o): In function `music_internal_playing':
/home/oguz/Projects/PSP/devtools/psplibraries/build/SDL_mixer/music.c:1115: undefined reference to `SMPEG_status'
/usr/local/pspdev/lib/gcc/psp/4.1.0/../../../../psp/lib/libSDL_mixer.a(music.o): In function `music_internal_halt':
/home/oguz/Projects/PSP/devtools/psplibraries/build/SDL_mixer/music.c:992: undefined reference to `SMPEG_stop'
/usr/local/pspdev/lib/gcc/psp/4.1.0/../../../../psp/lib/libSDL_mixer.a(music.o): In function `music_internal_volume':
/home/oguz/Projects/PSP/devtools/psplibraries/build/SDL_mixer/music.c:924: undefined reference to `SMPEG_setvolume'
/usr/local/pspdev/lib/gcc/psp/4.1.0/../../../../psp/lib/libSDL_mixer.a(music.o): In function `music_internal_position':
/home/oguz/Projects/PSP/devtools/psplibraries/build/SDL_mixer/music.c:841: undefined reference to `SMPEG_skip'
/home/oguz/Projects/PSP/devtools/psplibraries/build/SDL_mixer/music.c:843: undefined reference to `SMPEG_rewind'
/home/oguz/Projects/PSP/devtools/psplibraries/build/SDL_mixer/music.c:844: undefined reference to `SMPEG_play'
/usr/local/pspdev/lib/gcc/psp/4.1.0/../../../../psp/lib/libSDL_mixer.a(music.o): In function `music_internal_play':
/home/oguz/Projects/PSP/devtools/psplibraries/build/SDL_mixer/music.c:750: undefined reference to `SMPEG_enableaudio'
/home/oguz/Projects/PSP/devtools/psplibraries/build/SDL_mixer/music.c:751: undefined reference to `SMPEG_enablevideo'
/home/oguz/Projects/PSP/devtools/psplibraries/build/SDL_mixer/music.c:752: undefined reference to `SMPEG_play'
/usr/local/pspdev/lib/gcc/psp/4.1.0/../../../../psp/lib/libSDL_mixer.a(music.o): In function `Mix_FreeMusic':
/home/oguz/Projects/PSP/devtools/psplibraries/build/SDL_mixer/music.c:663: undefined reference to `SMPEG_delete'
/usr/local/pspdev/lib/gcc/psp/4.1.0/../../../../psp/lib/libSDL_mixer.a(music.o): In function `Mix_LoadMUS':
/home/oguz/Projects/PSP/devtools/psplibraries/build/SDL_mixer/music.c:568: undefined reference to `SMPEG_new'
/home/oguz/Projects/PSP/devtools/psplibraries/build/SDL_mixer/music.c:573: undefined reference to `SMPEG_actualSpec'
/usr/local/pspdev/lib/gcc/psp/4.1.0/../../../../psp/lib/libSDL_mixer.a(music.o): In function `music_mixer':
/home/oguz/Projects/PSP/devtools/psplibraries/build/SDL_mixer/music.c:318: undefined reference to `SMPEG_playAudio'
/usr/local/pspdev/lib/gcc/psp/4.1.0/../../../../psp/lib/libSDL_mixer.a(music_ogg.o): In function `OGG_jump_to_time':
/home/oguz/Projects/PSP/devtools/psplibraries/build/SDL_mixer/music_ogg.c:245: undefined reference to `ov_time_seek'
/usr/local/pspdev/lib/gcc/psp/4.1.0/../../../../psp/lib/libSDL_mixer.a(music_ogg.o): In function `OGG_delete':
/home/oguz/Projects/PSP/devtools/psplibraries/build/SDL_mixer/music_ogg.c:237: undefined reference to `ov_clear'
/usr/local/pspdev/lib/gcc/psp/4.1.0/../../../../psp/lib/libSDL_mixer.a(music_ogg.o): In function `OGG_playAudio':
/home/oguz/Projects/PSP/devtools/psplibraries/build/SDL_mixer/music_ogg.c:214: undefined reference to `SDL_MixAudio'
/home/oguz/Projects/PSP/devtools/psplibraries/build/SDL_mixer/music_ogg.c:159: undefined reference to `ov_read'
/home/oguz/Projects/PSP/devtools/psplibraries/build/SDL_mixer/music_ogg.c:173: undefined reference to `ov_info'
/usr/local/pspdev/lib/gcc/psp/4.1.0/../../../../psp/lib/libSDL_mixer.a(music_ogg.o): In function `OGG_new_RW':
/home/oguz/Projects/PSP/devtools/psplibraries/build/SDL_mixer/music_ogg.c:126: undefined reference to `ov_open_callbacks'
/usr/local/pspdev/lib/gcc/psp/4.1.0/../../../../psp/lib/libSDL_mixer.a(music_ogg.o): In function `OGG_new':
/home/oguz/Projects/PSP/devtools/psplibraries/build/SDL_mixer/music_ogg.c:74: undefined reference to `ov_open'
/usr/local/pspdev/lib/gcc/psp/4.1.0/../../../../psp/lib/libSDL_mixer.a(wavestream.o): In function `WAVStream_PlaySome':
/home/oguz/Projects/PSP/devtools/psplibraries/build/SDL_mixer/wavestream.c:196: undefined reference to `SDL_MixAudio'
/usr/local/pspdev/lib/gcc/psp/4.1.0/../../../../psp/lib/libSDL_mixer.a(wavestream.o): In function `ReadChunk':
/home/oguz/Projects/PSP/devtools/psplibraries/build/SDL_mixer/wavestream.c:241: undefined reference to `SDL_ReadLE32'
/home/oguz/Projects/PSP/devtools/psplibraries/build/SDL_mixer/wavestream.c:242: undefined reference to `SDL_ReadLE32'
/usr/local/pspdev/lib/gcc/psp/4.1.0/../../../../psp/lib/libSDL_mixer.a(wavestream.o): In function `WAVStream_LoadSong':
/home/oguz/Projects/PSP/devtools/psplibraries/build/SDL_mixer/wavestream.c:290: undefined reference to `SDL_ReadLE32'
/home/oguz/Projects/PSP/devtools/psplibraries/build/SDL_mixer/wavestream.c:291: undefined reference to `SDL_ReadLE32'
/home/oguz/Projects/PSP/devtools/psplibraries/build/SDL_mixer/wavestream.c:292: undefined reference to `SDL_ReadLE32'
/usr/local/pspdev/lib/gcc/psp/4.1.0/../../../../psp/lib/libSDL_mixer.a(wavestream.o):/home/oguz/Projects/PSP/devtools/psplibraries/build/SDL_mixer/wavestream.c:441: more undefined references to `SDL_ReadLE32' follow
/usr/local/pspdev/lib/gcc/psp/4.1.0/../../../../psp/lib/libSDL_mixer.a(wavestream.o): In function `WAVStream_LoadSong':
/home/oguz/Projects/PSP/devtools/psplibraries/build/SDL_mixer/wavestream.c:442: undefined reference to `SDL_ReadBE32'
/home/oguz/Projects/PSP/devtools/psplibraries/build/SDL_mixer/wavestream.c:443: undefined reference to `SDL_ReadLE32'
/home/oguz/Projects/PSP/devtools/psplibraries/build/SDL_mixer/wavestream.c:461: undefined reference to `SDL_ReadLE32'
/home/oguz/Projects/PSP/devtools/psplibraries/build/SDL_mixer/wavestream.c:462: undefined reference to `SDL_ReadBE32'
/home/oguz/Projects/PSP/devtools/psplibraries/build/SDL_mixer/wavestream.c:472: undefined reference to `SDL_ReadBE32'
/home/oguz/Projects/PSP/devtools/psplibraries/build/SDL_mixer/wavestream.c:473: undefined reference to `SDL_ReadBE32'
/home/oguz/Projects/PSP/devtools/psplibraries/build/SDL_mixer/wavestream.c:481: undefined reference to `SDL_ReadBE16'
/home/oguz/Projects/PSP/devtools/psplibraries/build/SDL_mixer/wavestream.c:482: undefined reference to `SDL_ReadBE32'
/home/oguz/Projects/PSP/devtools/psplibraries/build/SDL_mixer/wavestream.c:483: undefined reference to `SDL_ReadBE16'
/usr/local/pspdev/lib/gcc/psp/4.1.0/../../../../psp/lib/libSDL_mixer.a(load_aiff.o): In function `Mix_LoadAIFF_RW':
/home/oguz/Projects/PSP/devtools/psplibraries/build/SDL_mixer/load_aiff.c:104: undefined reference to `SDL_ReadLE32'
/home/oguz/Projects/PSP/devtools/psplibraries/build/SDL_mixer/load_aiff.c:105: undefined reference to `SDL_ReadBE32'
/home/oguz/Projects/PSP/devtools/psplibraries/build/SDL_mixer/load_aiff.c:111: undefined reference to `SDL_ReadLE32'
/home/oguz/Projects/PSP/devtools/psplibraries/build/SDL_mixer/load_aiff.c:127: undefined reference to `SDL_ReadLE32'
/home/oguz/Projects/PSP/devtools/psplibraries/build/SDL_mixer/load_aiff.c:128: undefined reference to `SDL_ReadBE32'
/home/oguz/Projects/PSP/devtools/psplibraries/build/SDL_mixer/load_aiff.c:144: undefined reference to `SDL_ReadBE16'
/home/oguz/Projects/PSP/devtools/psplibraries/build/SDL_mixer/load_aiff.c:145: undefined reference to `SDL_ReadBE32'
/home/oguz/Projects/PSP/devtools/psplibraries/build/SDL_mixer/load_aiff.c:146: undefined reference to `SDL_ReadBE16'
/home/oguz/Projects/PSP/devtools/psplibraries/build/SDL_mixer/load_aiff.c:137: undefined reference to `SDL_ReadBE32'
/home/oguz/Projects/PSP/devtools/psplibraries/build/SDL_mixer/load_aiff.c:138: undefined reference to `SDL_ReadBE32'
/home/oguz/Projects/PSP/devtools/psplibraries/build/SDL_mixer/load_aiff.c:158: undefined reference to `SDL_ReadBE32'
/home/oguz/Projects/PSP/devtools/psplibraries/build/SDL_mixer/load_aiff.c:159: undefined reference to `SDL_ReadBE32'
/home/oguz/Projects/PSP/devtools/psplibraries/build/SDL_mixer/load_aiff.c:160: undefined reference to `SDL_ReadBE32'
/home/oguz/Projects/PSP/devtools/psplibraries/build/SDL_mixer/load_aiff.c:161: undefined reference to `SDL_ReadBE16'
/usr/local/pspdev/lib/gcc/psp/4.1.0/../../../../psp/lib/libSDL_mixer.a(load_ogg.o): In function `Mix_LoadOGG_RW':
/home/oguz/Projects/PSP/devtools/psplibraries/build/SDL_mixer/load_ogg.c:93: undefined reference to `ov_open_callbacks'
/home/oguz/Projects/PSP/devtools/psplibraries/build/SDL_mixer/load_ogg.c:101: undefined reference to `ov_info'
/home/oguz/Projects/PSP/devtools/psplibraries/build/SDL_mixer/load_ogg.c:112: undefined reference to `ov_pcm_total'
/home/oguz/Projects/PSP/devtools/psplibraries/build/SDL_mixer/load_ogg.c:122: undefined reference to `ov_read'
/home/oguz/Projects/PSP/devtools/psplibraries/build/SDL_mixer/load_ogg.c:128: undefined reference to `ov_read'
/home/oguz/Projects/PSP/devtools/psplibraries/build/SDL_mixer/load_ogg.c:140: undefined reference to `ov_clear'
/usr/local/pspdev/psp/sdk/lib/libpspirkeyb.a(pspirkeyb.o): In function `hama':
pspirkeyb.c:(.text+0x370): undefined reference to `scePowerTick'
/usr/local/pspdev/psp/sdk/lib/libpspirkeyb.a(pspirkeyb.o): In function `palmuw':
pspirkeyb.c:(.text+0x59c): undefined reference to `scePowerTick'
/usr/local/pspdev/psp/sdk/lib/libpspirkeyb.a(pspirkeyb.o): In function `targus_infrared':
pspirkeyb.c:(.text+0x6ac): undefined reference to `scePowerTick'
/usr/local/pspdev/psp/sdk/lib/libpspirkeyb.a(pspirkeyb.o): In function `compaq_microkbd':
pspirkeyb.c:(.text+0x778): undefined reference to `scePowerTick'
/usr/local/pspdev/psp/sdk/lib/libpspirkeyb.a(pspirkeyb.o): In function `micro_datapad':
pspirkeyb.c:(.text+0x8d4): undefined reference to `scePowerTick'
/usr/local/pspdev/psp/sdk/lib/libpspirkeyb.a(pspirkeyb.o):pspirkeyb.c:(.text+0xa6c): more undefined references to `scePowerTick' follow
collect2: ld returned 1 exit status
make: *** [engine.elf] Error 1


And i'm using extern "C" around my main. I don't get the unreferenced main error anymore, but still no luck running my code on my psp :(

Btw the makefile is:

Code:

TARGET = engine
OBJS = main.o globals/globals.o globals/Timer.o sound/Sound.o sound/SoundEffect.o sound/Music.o graphics/Texture.o graphics/StaticTexture.o graphics/Animation.o graphics/TextureManager.o

INCDIR =
CFLAGS = -O2 -G0 -Wall
CXXFLAGS = $(CFLAGS) -fno-exceptions -fno-rtti
ASFLAGS = $(CFLAGS)

LIBDIR =
LDFLAGS =

EXTRA_TARGETS = EBOOT.PBP kxploit

PSP_EBOOT_TITLE = OguEngine
PSP_DIR_NAME = OguEngine
BUILD_PRX = 1
PSP_FW_VERSION = 371

PSPSDK = $(shell psp-config --pspsdk-path)
PSPBIN = $(PSPSDK)/../bin
CFLAGS += $(shell $(PSPBIN)/sdl-config --cflags)
LIBS= -lSDLmain -lSDL -lSDL_image -lSDL_mixer -lGLU -lGL -lpng -ljpeg -lz -lm -lstdc++ -lc -lpsputility -lpspdebug -lpspgu -lpspge -lpspdisplay -lpspctrl -lpspvfpu -lpspuser -lpsprtc -lpsppower -lpspdebug -lpspge -lpspaudio -lpspctrl -lpspnet -lpspnet_inet -lpspnet_apctl -lpspnet_resolver -lpsputility -lpspuser -lpsphprm -lpspirkeyb -lpspsdk
include $(PSPSDK)/lib/build.mak


[EDIT] Here's the output from sdl-config --libs:

Code:

$PSPSDK/../bin/sdl-config --libs
-L/usr/local/pspdev/psp/lib -lSDLmain -lSDL -lm -lGL -lpspvfpu -L/usr/local/pspdev/psp/sdk/lib -lpspdebug -lpspgu -lpspctrl -lpspge -lpspdisplay -lpsphprm -lpspsdk -lpsprtc -lpspaudio -lc -lpspuser -lpsputility -lpspkernel -lpspnet_inet -lpspirkeyb -lpsppower


Because of this i could use:

Code:

LIBS += $(shell $(PSPBIN)/sdl-config --libs) -lstdc++ -lSDL_image -lpng -ljpeg -lz -lSDL_mixer


as being suggested by the SDL's Readme.PSP file. But then i get other errors. I'm really starting to get frustrated :P

Oh linker, oh linker, what foul ways do you have to really annoy me? :P
Back to top
View user's profile Send private message
CpuWhiz



Joined: 04 Jun 2007
Posts: 42

PostPosted: Mon Dec 10, 2007 2:13 am    Post subject: Reply with quote

I am currently hanging out in #pspdev on freenode if you want to venture x-chat in there. Also it would go faster if I had the source and could try it on my system and fiddle with the LIBS line. If you don't want to share your source, that's fine, I understand. I am not too keen on sharing source to my program either. Just saying if you are willing to that would help things go faster.

As for my package, I am updating my gutsy install and will run my script as soon as it finishes. The old version that I am currently using is @ 19% and says another 152 minutes. I assume rapidshare is ok?
Back to top
View user's profile Send private message
Oguz286



Joined: 30 Oct 2007
Posts: 35

PostPosted: Mon Dec 10, 2007 2:45 am    Post subject: Reply with quote

CpuWhiz wrote:
I am currently hanging out in #pspdev on freenode if you want to venture x-chat in there. Also it would go faster if I had the source and could try it on my system and fiddle with the LIBS line. If you don't want to share your source, that's fine, I understand. I am not too keen on sharing source to my program either. Just saying if you are willing to that would help things go faster.

As for my package, I am updating my gutsy install and will run my script as soon as it finishes. The old version that I am currently using is @ 19% and says another 152 minutes. I assume rapidshare is ok?


I don't really mind sharing the source if it helps. You could put it on rapidshare, that's fine. Btw, i'm trying to get into #pspdev on irc.freenode.net but i have to be registered and i have no idea how to register myself there (yes, i'm a irc n00b).


Last edited by Oguz286 on Mon Dec 10, 2007 2:53 am; edited 1 time in total
Back to top
View user's profile Send private message
CpuWhiz



Joined: 04 Jun 2007
Posts: 42

PostPosted: Mon Dec 10, 2007 2:53 am    Post subject: Reply with quote

Join #ubuntu or #kubuntu then and mention my name - CpuWhiz and I will help you register. It's freenode.net BTW, but I will assume you got connected anyway.
Back to top
View user's profile Send private message
Oguz286



Joined: 30 Oct 2007
Posts: 35

PostPosted: Mon Dec 10, 2007 8:20 am    Post subject: Reply with quote

Ok so CpuWhiz helped me all day long to get a clean psptoolchain and libraries and made an ubuntu package. Everything installed great and my code compiles on his computer and runs on his psp, but i still can't compile it on my laptop.

These are the errors:

Code:
make
psp-gcc -I. -I/usr/local/pspdev/psp/sdk/include -O2 -G0 -Wall -DPLATFORM_PSP -D_PSP_FW_VERSION=371  -L. -L/usr/local/pspdev/psp/sdk/lib -specs=/usr/local/pspdev/psp/sdk/lib/prxspecs -Wl,-q,-T/usr/local/pspdev/psp/sdk/lib/linkfile.prx   main.o globals/globals.o globals/Timer.o sound/Sound.o sound/SoundEffect.o sound/Music.o graphics/Texture.o graphics/StaticTexture.o graphics/Animation.o graphics/TextureManager.o /usr/local/pspdev/psp/sdk/lib/prxexports.o -lSDL_mixer -lvorbisfile -lvorbis -logg -lSDL_image -lSDL -lSDLmain -lpng -ljpeg -lGL -lpspgu -lpsprtc -lpspvfpu -lpspirkeyb -lpspaudio -lpsphprm -lpsppower -lstdc++ -lz -lm -lpspdebug -lpspdisplay -lpspge -lpspctrl -lpspsdk -lc -lpspnet -lpspnet_inet -lpspnet_apctl -lpspnet_resolver -lpsputility -lpspuser -lpspkernel -o engine.elf
/usr/local/pspdev/lib/gcc/psp/4.1.0/../../../../psp/lib/libSDL_mixer.a(music.o): In function `music_internal_playing':
/home/oguz/Projects/PSP/devtools/pspnew/package_script/psplibraries/build/SDL_mixer/music.c:1115: undefined reference to `SMPEG_status'
/usr/local/pspdev/lib/gcc/psp/4.1.0/../../../../psp/lib/libSDL_mixer.a(music.o): In function `music_internal_halt':
/home/oguz/Projects/PSP/devtools/pspnew/package_script/psplibraries/build/SDL_mixer/music.c:992: undefined reference to `SMPEG_stop'
/usr/local/pspdev/lib/gcc/psp/4.1.0/../../../../psp/lib/libSDL_mixer.a(music.o): In function `music_internal_volume':
/home/oguz/Projects/PSP/devtools/pspnew/package_script/psplibraries/build/SDL_mixer/music.c:924: undefined reference to `SMPEG_setvolume'
/usr/local/pspdev/lib/gcc/psp/4.1.0/../../../../psp/lib/libSDL_mixer.a(music.o): In function `music_internal_position':
/home/oguz/Projects/PSP/devtools/pspnew/package_script/psplibraries/build/SDL_mixer/music.c:841: undefined reference to `SMPEG_skip'
/home/oguz/Projects/PSP/devtools/pspnew/package_script/psplibraries/build/SDL_mixer/music.c:843: undefined reference to `SMPEG_rewind'
/home/oguz/Projects/PSP/devtools/pspnew/package_script/psplibraries/build/SDL_mixer/music.c:844: undefined reference to `SMPEG_play'
/usr/local/pspdev/lib/gcc/psp/4.1.0/../../../../psp/lib/libSDL_mixer.a(music.o): In function `music_internal_play':
/home/oguz/Projects/PSP/devtools/pspnew/package_script/psplibraries/build/SDL_mixer/music.c:750: undefined reference to `SMPEG_enableaudio'
/home/oguz/Projects/PSP/devtools/pspnew/package_script/psplibraries/build/SDL_mixer/music.c:751: undefined reference to `SMPEG_enablevideo'
/home/oguz/Projects/PSP/devtools/pspnew/package_script/psplibraries/build/SDL_mixer/music.c:752: undefined reference to `SMPEG_play'
/usr/local/pspdev/lib/gcc/psp/4.1.0/../../../../psp/lib/libSDL_mixer.a(music.o): In function `Mix_FreeMusic':
/home/oguz/Projects/PSP/devtools/pspnew/package_script/psplibraries/build/SDL_mixer/music.c:663: undefined reference to `SMPEG_delete'
/usr/local/pspdev/lib/gcc/psp/4.1.0/../../../../psp/lib/libSDL_mixer.a(music.o): In function `Mix_LoadMUS':
/home/oguz/Projects/PSP/devtools/pspnew/package_script/psplibraries/build/SDL_mixer/music.c:568: undefined reference to `SMPEG_new'
/home/oguz/Projects/PSP/devtools/pspnew/package_script/psplibraries/build/SDL_mixer/music.c:573: undefined reference to `SMPEG_actualSpec'
/usr/local/pspdev/lib/gcc/psp/4.1.0/../../../../psp/lib/libSDL_mixer.a(music.o): In function `music_mixer':
/home/oguz/Projects/PSP/devtools/pspnew/package_script/psplibraries/build/SDL_mixer/music.c:318: undefined reference to `SMPEG_playAudio'
collect2: ld returned 1 exit status
make: *** [engine.elf] Error 1


So it has something to do with the SMPEG library. I searched synaptic to find something that resembles this, but i already have everything installed. I'm all out of ideas and i'm starting to get a bit depressed. Does anyone have a solution for this?
Back to top
View user's profile Send private message
Oguz286



Joined: 30 Oct 2007
Posts: 35

PostPosted: Mon Dec 10, 2007 9:16 am    Post subject: Reply with quote

I finally solved it. I found a SMPEG library for psp with the help of google and added it to the library. Wouldn't it be wise to put it in the SVN? People wouldn't have to spend 2 days figuring out how to compile their code :)
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 -> PSP 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