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 

[Solved] Error on compiling LTE mod sample

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



Joined: 25 Oct 2008
Posts: 60
Location: Lithuania

PostPosted: Tue Mar 02, 2010 12:01 am    Post subject: [Solved] Error on compiling LTE mod sample Reply with quote

I tried yo rewrite LTE Engine sample for LTE Engine Mod by Brick

Quote:
pihas@pihas-netbook:~/Projektai/LTE_LITE_MOD/Hello$ make
psp-g++ -I-I -I../psp/sdk/include/ -I. -I/usr/local/pspdev/psp/sdk/include -G0 -O2 -I-I -I../psp/sdk/include/ -I. -I/usr/local/pspdev/psp/sdk/include -G0 -O2 -fno-exceptions -fno-rtti -D_PSP_FW_VERSION=390 -c -o main.o main.cpp
psp-gcc -I-I -I../psp/sdk/include/ -I. -I/usr/local/pspdev/psp/sdk/include -G0 -O2 -D_PSP_FW_VERSION=390 -L-L -L../psp/sdk/lib/ -L. -L/usr/local/pspdev/psp/sdk/lib main.o -lpspwlan -lglut -lGLU -lGL -lpspvfpu -lm -lstdc++ -lpsppower -lpsprtc -lpspaudio -lpspdebug -lpspdisplay -lpspge -lpspctrl -lpspsdk -lc -lpspnet -lpspnet_inet -lpspnet_apctl -lpspnet_resolver -lpsputility -lpspuser -lpspkernel -o HelloWorld.elf
/usr/local/pspdev/lib/gcc/psp/4.3.2/../../../../psp/lib/crt0.o: In function `_main':
/home/pihas/psptoolchain/build/pspsdk/src/startup/crt0.c:86: undefined reference to `main'
main.o: In function `engineMain(unsigned int, void*)':
main.cpp:(.text+0x14c): undefined reference to `CALLBACKS::preparePSP()'
main.cpp:(.text+0x154): undefined reference to `engine::ExtModules::CTextureFont::CTextureFont()'
main.cpp:(.text+0x160): undefined reference to `engine::createDevice(engine::IEventReceiver*, bool)'
main.cpp:(.text+0x3dc): undefined reference to `engine::ExtModules::CTextureFont::renderOptimized(wchar_t const*, engine::core::position2d<int> const&, engine::video::SColor const&, unsigned int, bool)'
main.cpp:(.text+0x64c): undefined reference to `engine::ExtModules::CTextureFont::getDimension(wchar_t const*)'
main.cpp:(.text+0x774): undefined reference to `engine::ExtModules::CTextureFont::~CTextureFont()'
collect2: ld returned 1 exit status
make: *** [HelloWorld.elf] Error 1
pihas@pihas-netbook:~/Projektai/LTE_LITE_MOD/Hello$


My Makefile:
Quote:
TARGET = HelloWorld
OBJS = main.o

INCDIR = -I ../psp/sdk/include/
CFLAGS = -G0 -O2
CXXFLAGS = $(CFLAGS) -fno-exceptions -fno-rtti
ASFLAGS = $(CFLAGS)

PSP_FW_VERSION = 390
PSP_LARGE_MEMORY = 1

LIBDIR = -L ../psp/sdk/lib/
LDFLAGS =
LIBS= -lpspwlan -lglut -lGLU -lGL -lpspvfpu -lm -lstdc++ -lpsppower -lpsprtc -lpspaudio

EXTRA_TARGETS = EBOOT.PBP
PSP_EBOOT_TITLE = LTE GE Example - HelloWorld

PSPSDK=$(shell psp-config --pspsdk-path)
include $(PSPSDK)/lib/build.mak

Any ideas how to fix it?


Last edited by Pihas on Tue Mar 02, 2010 6:35 am; edited 1 time in total
Back to top
View user's profile Send private message Visit poster's website
Alberto



Joined: 12 Feb 2007
Posts: 57
Location: Sofia

PostPosted: Tue Mar 02, 2010 12:14 am    Post subject: Reply with quote

Hi,

first of all, remove the -I from INCDIR, and -L from LIBDIR, I don't think this is the main issue, but for cleanness... ;-)

then, are there any other source files needed for this project .c, .c++, .cpp, etc.)? I fso, then add the relevant .o in the line OBJS, just leaving a space between them.

HTH

Cheers, A.
Back to top
View user's profile Send private message
Pihas



Joined: 25 Oct 2008
Posts: 60
Location: Lithuania

PostPosted: Tue Mar 02, 2010 5:53 am    Post subject: Reply with quote

By the previos error I made a mistake in code of main.cpp and got new error shown up.
Code:

-lpsputility -lpspuser -lpspkernel -o HelloWorld.elf
../psp/sdk/lib/libengine.a(CAudioDriver.o): In function `engine::audio::CAudioSound::play()':
CAudioDriver.cpp:(.text+0x3c0): undefined reference to `sceAudiocodecCheckNeedMem'
CAudioDriver.cpp:(.text+0x3d4): undefined reference to `sceAudiocodecGetEDRAM'
CAudioDriver.cpp:(.text+0x3e8): undefined reference to `sceAudiocodecInit'
../psp/sdk/lib/libengine.a(CAudioDriver.o): In function `engine::audio::CAudioSound::stop_in_thread()':
CAudioDriver.cpp:(.text+0x61c): undefined reference to `sceAudiocodecReleaseEDRAM'
../psp/sdk/lib/libengine.a(CAudioDriver.o): In function `engine::audio::CAudioSound::stop()':
CAudioDriver.cpp:(.text+0x10b4): undefined reference to `sceAudiocodecReleaseEDRAM'
../psp/sdk/lib/libengine.a(CAudioDriver.o): In function `engine::audio::CAudioSound::~CAudioSound()':
CAudioDriver.cpp:(.text+0x13a0): undefined reference to `sceAudiocodecReleaseEDRAM'
../psp/sdk/lib/libengine.a(CAudioDriver.o): In function `engine::audio::CAudioSound::~CAudioSound()':
CAudioDriver.cpp:(.text+0x14d0): undefined reference to `sceAudiocodecReleaseEDRAM'
../psp/sdk/lib/libengine.a(CAudioDriver.o): In function `engine::audio::CAudioSound::~CAudioSound()':
CAudioDriver.cpp:(.text+0x1600): undefined reference to `sceAudiocodecReleaseEDRAM'
../psp/sdk/lib/libengine.a(CAudioDriver.o): In function `engine::audio::__audioCallback(int, void*, unsigned int)':
CAudioDriver.cpp:(.text+0x34f4): undefined reference to `sceAudiocodecDecode'
CAudioDriver.cpp:(.text+0x37f8): undefined reference to `sceAudiocodecReleaseEDRAM'
collect2: ld returned 1 exit status
make: *** [HelloWorld.elf] Error 1
pihas@pihas-netbook:~/Projektai/LTE_LITE_MOD/Hello$


If fixed everythink by adding libs in make file:
-lpspaudiocodec -lpspaudiolib -lpspaudio
Back to top
View user's profile Send private message Visit poster's website
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