lua on PSP (not lua player !)
lua on PSP (not lua player !)
hi,
i have to read my own lua script without using the excellent (but too complete in my case) luaplayer
any ideas ?
i had a look inside the lua player samples but the lua lib files (header and lib) are not present...
thanks in advance !
i have to read my own lua script without using the excellent (but too complete in my case) luaplayer
any ideas ?
i had a look inside the lua player samples but the lua lib files (header and lib) are not present...
thanks in advance !
Sorry, I didn't realise that.
I think it's available on the PS2Dev Subversion server:
http://svn.ps2dev.org/listing.php?repna ... rev=0&sc=0
Pete
I think it's available on the PS2Dev Subversion server:
http://svn.ps2dev.org/listing.php?repna ... rev=0&sc=0
Pete
ok now i can compile and test the lua sample
i've modified it and everything works perfectly
so i've tried to put some lua stuff in my own code
but when i try to link with lua libs : -llualib -llua (like in the lua sample !)
i've the following errors :
i've searched for the maths functions asked but nothing (except this from lua package) contains these !!!
i really don't understand how the lua sample can link !
there's somthing strange here !!
any ideas welcome !
here is the makefile i use :
if someone could tell be wich library contains theses maths functions i could check my sdk and update if needed
but that doesn"t explain how the lua sample can link !! ???
i've modified it and everything works perfectly
so i've tried to put some lua stuff in my own code
but when i try to link with lua libs : -llualib -llua (like in the lua sample !)
i've the following errors :
Code: Select all
Performing Makefile project actions
Makefile (30) : warning: overriding commands for target `kxploit'
c:/cygwin/usr/local/pspdev/psp/sdk/lib/build.mak (137) : warning: ignoring old commands for target `kxploit'
rm -f nXviewer.elf nXviewer.o _libs/callbacks.o _libs/vram.o PARAM.SFO EBOOT.PBP EBOOT.PBP
C:/cygwin/usr/local/pspdev/bin/vs-psp-gcc -I. -Ic:/cygwin/usr/local/pspdev/psp/sdk/include -O2 -G0 -Wall -c -o nXviewer.o nXviewer.c
C:/cygwin/usr/local/pspdev/bin/vs-psp-gcc -I. -Ic:/cygwin/usr/local/pspdev/psp/sdk/include -O2 -G0 -Wall -c -o _libs/callbacks.o _libs/callbacks.c
C:/cygwin/usr/local/pspdev/bin/vs-psp-gcc -I. -Ic:/cygwin/usr/local/pspdev/psp/sdk/include -O2 -G0 -Wall -c -o _libs/vram.o _libs/vram.c
C:/cygwin/usr/local/pspdev/bin/vs-psp-gcc -I. -Ic:/cygwin/usr/local/pspdev/psp/sdk/include -O2 -G0 -Wall -L. -Lc:/cygwin/usr/local/pspdev/psp/sdk/lib nXviewer.o _libs/callbacks.o _libs/vram.o -lpspgum -lpspgu -lm -lpspusb -lpspusbstor -llualib -llua -lpspdebug -lpspdisplay -lpspge -lpspctrl -lpspsdk -lc -lpspnet -lpspnet_inet -lpspnet_apctl -lpspnet_resolver -lpsputility -lpspuser -lpspkernel -o nXviewer.elf
/usr/local/pspdev/lib/gcc/psp/4.0.2/../../../../psp/lib/liblualib.a(lmathlib.o): In function `math_tan':
lmathlib.c:(.text+0xd0): undefined reference to `tanf'
/usr/local/pspdev/lib/gcc/psp/4.0.2/../../../../psp/lib/liblualib.a(lmathlib.o): In function `math_asin':
lmathlib.c:(.text+0x110): undefined reference to `asinf'
/usr/local/pspdev/lib/gcc/psp/4.0.2/../../../../psp/lib/liblualib.a(lmathlib.o): In function `math_acos':
lmathlib.c:(.text+0x150): undefined reference to `acosf'
/usr/local/pspdev/lib/gcc/psp/4.0.2/../../../../psp/lib/liblualib.a(lmathlib.o): In function `math_atan':
lmathlib.c:(.text+0x190): undefined reference to `atanf'
/usr/local/pspdev/lib/gcc/psp/4.0.2/../../../../psp/lib/liblualib.a(lmathlib.o): In function `math_atan2':
lmathlib.c:(.text+0x1e8): undefined reference to `atan2f'
/usr/local/pspdev/lib/gcc/psp/4.0.2/../../../../psp/lib/liblualib.a(lmathlib.o): In function `math_ceil':
lmathlib.c:(.text+0x22c): undefined reference to `ceilf'
/usr/local/pspdev/lib/gcc/psp/4.0.2/../../../../psp/lib/liblualib.a(lmathlib.o): In function `math_mod':
lmathlib.c:(.text+0x2c4): undefined reference to `fmodf'
/usr/local/pspdev/lib/gcc/psp/4.0.2/../../../../psp/lib/liblualib.a(lmathlib.o): In function `math_sqrt':
lmathlib.c:(.text+0x31c): undefined reference to `sqrtf'
/usr/local/pspdev/lib/gcc/psp/4.0.2/../../../../psp/lib/liblualib.a(lmathlib.o): In function `math_pow':
lmathlib.c:(.text+0x378): undefined reference to `powf'
/usr/local/pspdev/lib/gcc/psp/4.0.2/../../../../psp/lib/liblualib.a(lmathlib.o): In function `math_log':
lmathlib.c:(.text+0x3bc): undefined reference to `logf'
/usr/local/pspdev/lib/gcc/psp/4.0.2/../../../../psp/lib/liblualib.a(lmathlib.o): In function `math_log10':
lmathlib.c:(.text+0x3fc): undefined reference to `log10f'
/usr/local/pspdev/lib/gcc/psp/4.0.2/../../../../psp/lib/liblualib.a(lmathlib.o): In function `math_exp':
lmathlib.c:(.text+0x43c): undefined reference to `expf'
collect2: ld returned 1 exit status
psp-fixup-imports nXviewer.elf
Error, could not find file nXviewer.elf
mksfo 'nXviewer' PARAM.SFO
psp-strip nXviewer.elf -o nXviewer_strip.elf
psp-strip: 'nXviewer.elf': No such file
pack-pbp EBOOT.PBP PARAM.SFO NULL \ NULL NULL NULL \ NULL nXviewer_strip.elf NULL
ERROR: Could not open the file. (nXviewer_strip.elf)
make: *** [EBOOT.PBP] Error 255
i really don't understand how the lua sample can link !
there's somthing strange here !!
any ideas welcome !
here is the makefile i use :
Code: Select all
TARGET = nXviewer
OBJS = nXviewer.o _libs/callbacks.o _libs/vram.o
INCDIR =
CFLAGS = -O2 -G0 -Wall
CXXFLAGS = $(CFLAGS) -fno-exceptions -fno-rtti
ASFLAGS = $(CFLAGS)
LIBDIR =
LDFLAGS =
LIBS= -lpspgum -lpspgu -lm -lpspusb -lpspusbstor -llualib -llua
EXTRA_TARGETS = EBOOT.PBP
PSP_EBOOT_TITLE = nXviewer
PSPSDK=c:/cygwin/usr/local/pspdev/psp/sdk#$(shell psp-config --pspsdk-path)
include $(PSPSDK)/lib/build.mak
ifneq ($VS_PATH),)
CC = C:/cygwin/usr/local/pspdev/bin/vs-psp-gcc
CXX = C:/cygwin/usr/local/pspdev/bin/vs-psp-g++
endif
XTARGET = $(shell echo $(TARGET)000000 | cut -b1-6)
KXDIR = $(TARGET)
KXDUMMY = $(TARGET)%
kxploit: $(TARGET).elf $(PSP_EBOOT_SFO)
mkdir -p "$(KXDIR)"
$(STRIP) $(TARGET).elf -o $(KXDIR)/$(PSP_EBOOT)
mkdir -p "$(KXDUMMY)"
$(PACK_PBP) "$(KXDUMMY)/$(PSP_EBOOT)" $(PSP_EBOOT_SFO) $(PSP_EBOOT_ICON) \
$(PSP_EBOOT_ICON1) $(PSP_EBOOT_UNKPNG) $(PSP_EBOOT_PIC1) \
$(PSP_EBOOT_SND0) NULL $(PSP_EBOOT_PSAR)
cp -r $(KXDIR) $(PSP_MOUNT)/PSP/GAME/
cp -r $(KXDUMMY) $(PSP_MOUNT)/PSP/GAME/
but that doesn"t explain how the lua sample can link !! ???