[Solved] Error on compiling LTE mod sample

Discuss the development of new homebrew software, tools and libraries.

Moderators: cheriff, TyRaNiD

Post Reply
Pihas
Posts: 53
Joined: Sat Oct 25, 2008 10:26 pm
Location: Lithuania
Contact:

[Solved] Error on compiling LTE mod sample

Post by Pihas »

I tried yo rewrite LTE Engine sample for LTE Engine Mod by Brick
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:
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.
Alberto
Posts: 51
Joined: Mon Feb 12, 2007 8:16 pm
Location: Sofia

Post by Alberto »

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.
Pihas
Posts: 53
Joined: Sat Oct 25, 2008 10:26 pm
Location: Lithuania
Contact:

Post by Pihas »

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

Code: Select all

-lpsputility -lpspuser -lpspkernel -o HelloWorld.elf
../psp/sdk/lib/libengine.a&#40;CAudioDriver.o&#41;&#58; In function `engine&#58;&#58;audio&#58;&#58;CAudioSound&#58;&#58;play&#40;&#41;'&#58;
CAudioDriver.cpp&#58;&#40;.text+0x3c0&#41;&#58; undefined reference to `sceAudiocodecCheckNeedMem'
CAudioDriver.cpp&#58;&#40;.text+0x3d4&#41;&#58; undefined reference to `sceAudiocodecGetEDRAM'
CAudioDriver.cpp&#58;&#40;.text+0x3e8&#41;&#58; undefined reference to `sceAudiocodecInit'
../psp/sdk/lib/libengine.a&#40;CAudioDriver.o&#41;&#58; In function `engine&#58;&#58;audio&#58;&#58;CAudioSound&#58;&#58;stop_in_thread&#40;&#41;'&#58;
CAudioDriver.cpp&#58;&#40;.text+0x61c&#41;&#58; undefined reference to `sceAudiocodecReleaseEDRAM'
../psp/sdk/lib/libengine.a&#40;CAudioDriver.o&#41;&#58; In function `engine&#58;&#58;audio&#58;&#58;CAudioSound&#58;&#58;stop&#40;&#41;'&#58;
CAudioDriver.cpp&#58;&#40;.text+0x10b4&#41;&#58; undefined reference to `sceAudiocodecReleaseEDRAM'
../psp/sdk/lib/libengine.a&#40;CAudioDriver.o&#41;&#58; In function `engine&#58;&#58;audio&#58;&#58;CAudioSound&#58;&#58;~CAudioSound&#40;&#41;'&#58;
CAudioDriver.cpp&#58;&#40;.text+0x13a0&#41;&#58; undefined reference to `sceAudiocodecReleaseEDRAM'
../psp/sdk/lib/libengine.a&#40;CAudioDriver.o&#41;&#58; In function `engine&#58;&#58;audio&#58;&#58;CAudioSound&#58;&#58;~CAudioSound&#40;&#41;'&#58;
CAudioDriver.cpp&#58;&#40;.text+0x14d0&#41;&#58; undefined reference to `sceAudiocodecReleaseEDRAM'
../psp/sdk/lib/libengine.a&#40;CAudioDriver.o&#41;&#58; In function `engine&#58;&#58;audio&#58;&#58;CAudioSound&#58;&#58;~CAudioSound&#40;&#41;'&#58;
CAudioDriver.cpp&#58;&#40;.text+0x1600&#41;&#58; undefined reference to `sceAudiocodecReleaseEDRAM'
../psp/sdk/lib/libengine.a&#40;CAudioDriver.o&#41;&#58; In function `engine&#58;&#58;audio&#58;&#58;__audioCallback&#40;int, void*, unsigned int&#41;'&#58;
CAudioDriver.cpp&#58;&#40;.text+0x34f4&#41;&#58; undefined reference to `sceAudiocodecDecode'
CAudioDriver.cpp&#58;&#40;.text+0x37f8&#41;&#58; undefined reference to `sceAudiocodecReleaseEDRAM'
collect2&#58; ld returned 1 exit status
make&#58; *** &#91;HelloWorld.elf&#93; Error 1
pihas@pihas-netbook&#58;~/Projektai/LTE_LITE_MOD/Hello$ 
If fixed everythink by adding libs in make file:
-lpspaudiocodec -lpspaudiolib -lpspaudio
Post Reply