where and how get PSPGL
where and how get PSPGL
Hi,
I would like try OpenGL dev on my PSP and i found on this forum some informations about a lib PSPGL.I tried sceGu,sceGum but for porting my existing programs, it's not easy.
Where can i find this lib?
at http://www.goop.org/psp/gl/ ???
and if it's by svn way, can you explain me how get it? i'm not familiar with svn commands
thanks by advance
PS: sorry for my poor english
PS2: i use linux (gentoo) and i have svn install on my computer
I would like try OpenGL dev on my PSP and i found on this forum some informations about a lib PSPGL.I tried sceGu,sceGum but for porting my existing programs, it's not easy.
Where can i find this lib?
at http://www.goop.org/psp/gl/ ???
and if it's by svn way, can you explain me how get it? i'm not familiar with svn commands
thanks by advance
PS: sorry for my poor english
PS2: i use linux (gentoo) and i have svn install on my computer
Yes, you can download a .zip file of the current source of PSPGL from http://hg.goop.org/pspgl/jsgf?cmd=archi ... g;type=zip. You can compile and install it with the normal SDK tools.
I just try to port something and i have this error:
pm@fif ~/devPSP/pspgl/tawaGL $ make
g++ -c -o main.o main.cpp
g++ -c -o tawa.o tawa.cpp
g++ -c -o object.o object.cpp
g++ -c -o light.o light.cpp
g++ -c -o cam.o cam.cpp
psp-gcc main.o tawa.o object.o light.o cam.o -g -Wall -O2 -DMODULE_NAME="tawaGL" psp-setup.c -L/usr/local/pspdev/psp/sdk/lib -L.. -lglut -lGLU -lGL -lm -lpspdebug -lpspge -lpspdisplay -lpspctrl -lpspsdk -lpsplibc -lpspuser -lpspkernel -lstdc++ -o tawaGL
/usr/local/pspdev/lib/gcc/psp/4.0.1/../../../../psp/bin/ld: main.o: Relocations in generic ELF (EM: 3)
main.o: ne peut lire les symboles: File in wrong format
collect2: ld a retourné 1 code d'état d'exécution
make: *** [tawaGL] Erreur 1
What is wrong ?
Something to change into Makefile because my program is in C++?
pm@fif ~/devPSP/pspgl/tawaGL $ make
g++ -c -o main.o main.cpp
g++ -c -o tawa.o tawa.cpp
g++ -c -o object.o object.cpp
g++ -c -o light.o light.cpp
g++ -c -o cam.o cam.cpp
psp-gcc main.o tawa.o object.o light.o cam.o -g -Wall -O2 -DMODULE_NAME="tawaGL" psp-setup.c -L/usr/local/pspdev/psp/sdk/lib -L.. -lglut -lGLU -lGL -lm -lpspdebug -lpspge -lpspdisplay -lpspctrl -lpspsdk -lpsplibc -lpspuser -lpspkernel -lstdc++ -o tawaGL
/usr/local/pspdev/lib/gcc/psp/4.0.1/../../../../psp/bin/ld: main.o: Relocations in generic ELF (EM: 3)
main.o: ne peut lire les symboles: File in wrong format
collect2: ld a retourné 1 code d'état d'exécution
make: *** [tawaGL] Erreur 1
What is wrong ?
Something to change into Makefile because my program is in C++?
ok, thanks for that
i have change the makefile like this:
but now, i have many errors now:
i have change the makefile like this:
Code: Select all
CC = psp-gcc
CCX = psp-g++
PSP_INSTALL = ../tools/psp-install
RM = rm -f
PSPPATH := $(shell psp-config --pspsdk-path)
PSPGL_LFLAGS = -lglut -lGLU -lGL -lm -lpspdebug -lpspge -lpspdisplay -lpspctrl -lpspsdk -lpsplibc -lpspuser -lpspkernel -lstdc++
CFLAGS = -g -Wall -O2 -MD -I$(PSPPATH)/include -I..
LFLAGS = -g -Wall -O2 -DMODULE_NAME="tawaGL" psp-setup.c -L$(PSPPATH)/lib -L.. $(PSPGL_LFLAGS)
TARGET = tawaGL
OBJS = main.o tawa.o object.o light.o cam.o
BUILDDATE = $(shell date "+%Y/%m/%d %k:%M:%S")
PSPSDK=$(shell psp-config --pspsdk-path)
all: $(TARGET)
.c.o:
$(CC) $(CFLAGS) -c $<
.cpp.o:
$(CCX) $(CFLAGS) -c $<
$(TARGET): $(OBJS)
$(CC) $(OBJS) $(LFLAGS) -o $@
install: all
$(PSP_INSTALL) $(TARGET) --eboot-title="$(TARGET) $(BUILDDATE)" --eboot-icon="ICON.PNG"
clean:
$(RM) *.d *.o $(TARGET)
-include $(wildcard *.d) dummy
Code: Select all
pm@power64 ~/devPSP/pspgl/tawaGL $ make
psp-gcc main.o tawa.o object.o light.o cam.o -g -Wall -O2 -DMODULE_NAME="tawaGL" psp-setup.c -L/usr/local/pspdev/psp/sdk/lib -L.. -lglut -lGLU -lGL -lm -lpspdebug -lpspge -lpspdisplay -lpspctrl -lpspsdk -lpsplibc -lpspuser -lpspkernel -lstdc++ -o tawaGL
main.o: dans la fonction « init »:
/home/pm/devPSP/pspgl/tawaGL/main.cpp:104: référence indéfinie vers « __psp_log(char const*, ...)»
/home/pm/devPSP/pspgl/tawaGL/main.cpp:103: référence indéfinie vers « __psp_log(char const*, ...)»
/home/pm/devPSP/pspgl/tawaGL/main.cpp:102: référence indéfinie vers « __psp_log(char const*, ...)»
/home/pm/devPSP/pspgl/tawaGL/main.cpp:101: référence indéfinie vers « __psp_log(char const*, ...)»
/home/pm/devPSP/pspgl/tawaGL/main.cpp:100: référence indéfinie vers « __psp_log(char const*, ...)»
main.o:/home/pm/devPSP/pspgl/tawaGL/main.cpp:214: encore plus de références indéfinies suivent vers « __psp_log(char const*, ...)»
object.o:/home/pm/devPSP/pspgl/tawaGL/object.cpp:91: référence indéfinie vers « glCallList »
object.o:/home/pm/devPSP/pspgl/tawaGL/object.cpp:103: référence indéfinie vers « glNewList »
object.o:/home/pm/devPSP/pspgl/tawaGL/object.cpp:139: référence indéfinie vers « glEndList »
object.o:/home/pm/devPSP/pspgl/tawaGL/object.cpp:139: référence indéfinie vers « glEndList »
../libGL.a(glMaterial.o): dans la fonction « glMaterialf »:
/tmp/pspdev/pspsdk/pspgl/glMaterial.c:36: référence indéfinie vers « glGetMaterialfv »
/usr/local/pspdev/lib/gcc/psp/4.0.1/../../../../psp/lib/libstdc++.a(vterminate.o):../../../../libstdc++-v3/libsupc++/vterminate.cc:69: référence indéfinie vers « _impure_ptr »
/usr/local/pspdev/lib/gcc/psp/4.0.1/../../../../psp/lib/libstdc++.a(vterminate.o):../../../../libstdc++-v3/libsupc++/vterminate.cc:69: relocalisation tronquée pour concorder: R_MIPS_GPREL16 avec _impure_ptr
/usr/local/pspdev/lib/gcc/psp/4.0.1/../../../../psp/lib/libstdc++.a(vterminate.o):../../../../libstdc++-v3/libsupc++/vterminate.cc:69: référence indéfinie vers « fwrite »
/usr/local/pspdev/lib/gcc/psp/4.0.1/../../../../psp/lib/libstdc++.a(vterminate.o):../../../../libstdc++-v3/libsupc++/vterminate.cc:70: référence indéfinie vers « _impure_ptr »
/usr/local/pspdev/lib/gcc/psp/4.0.1/../../../../psp/lib/libstdc++.a(vterminate.o):../../../../libstdc++-v3/libsupc++/vterminate.cc:70: relocalisation tronquée pour concorder: R_MIPS_GPREL16 avec _impure_ptr
/usr/local/pspdev/lib/gcc/psp/4.0.1/../../../../psp/lib/libstdc++.a(vterminate.o):../../../../libstdc++-v3/libsupc++/vterminate.cc:71: référence indéfinie vers « fputs »
/usr/local/pspdev/lib/gcc/psp/4.0.1/../../../../psp/lib/libstdc++.a(vterminate.o):../../../../libstdc++-v3/libsupc++/vterminate.cc:74: référence indéfinie vers « _impure_ptr »
/usr/local/pspdev/lib/gcc/psp/4.0.1/../../../../psp/lib/libstdc++.a(vterminate.o):../../../../libstdc++-v3/libsupc++/vterminate.cc:74: relocalisation tronquée pour concorder: R_MIPS_GPREL16 avec _impure_ptr
/usr/local/pspdev/lib/gcc/psp/4.0.1/../../../../psp/lib/libstdc++.a(vterminate.o):../../../../libstdc++-v3/libsupc++/vterminate.cc:74: référence indéfinie vers « fwrite »
/usr/local/pspdev/lib/gcc/psp/4.0.1/../../../../psp/lib/libstdc++.a(vterminate.o):../../../../libstdc++-v3/libsupc++/vterminate.cc:73: référence indéfinie vers « fputs »
/usr/local/pspdev/lib/gcc/psp/4.0.1/../../../../psp/lib/libstdc++.a(vterminate.o):../../../../libstdc++-v3/libsupc++/vterminate.cc:74: référence indéfinie vers « _impure_ptr »
/usr/local/pspdev/lib/gcc/psp/4.0.1/../../../../psp/lib/libstdc++.a(vterminate.o):../../../../libstdc++-v3/libsupc++/vterminate.cc:74: relocalisation tronquée pour concorder: R_MIPS_GPREL16 avec _impure_ptr
/usr/local/pspdev/lib/gcc/psp/4.0.1/../../../../psp/lib/libstdc++.a(vterminate.o):../../../../libstdc++-v3/libsupc++/vterminate.cc:74: référence indéfinie vers « fwrite »
/usr/local/pspdev/lib/gcc/psp/4.0.1/../../../../psp/lib/libstdc++.a(vterminate.o):../../../../libstdc++-v3/libsupc++/vterminate.cc:51: référence indéfinie vers « _impure_ptr »
/usr/local/pspdev/lib/gcc/psp/4.0.1/../../../../psp/lib/libstdc++.a(vterminate.o):../../../../libstdc++-v3/libsupc++/vterminate.cc:51: relocalisation tronquée pour concorder: R_MIPS_GPREL16 avec _impure_ptr
/usr/local/pspdev/lib/gcc/psp/4.0.1/../../../../psp/lib/libstdc++.a(vterminate.o):../../../../libstdc++-v3/libsupc++/vterminate.cc:51: référence indéfinie vers « fwrite »
/usr/local/pspdev/lib/gcc/psp/4.0.1/../../../../psp/lib/libstdc++.a(vterminate.o):../../../../libstdc++-v3/libsupc++/vterminate.cc:95: référence indéfinie vers « _impure_ptr »
/usr/local/pspdev/lib/gcc/psp/4.0.1/../../../../psp/lib/libstdc++.a(vterminate.o):../../../../libstdc++-v3/libsupc++/vterminate.cc:95: relocalisation tronquée pour concorder: R_MIPS_GPREL16 avec _impure_ptr
/usr/local/pspdev/lib/gcc/psp/4.0.1/../../../../psp/lib/libstdc++.a(vterminate.o):../../../../libstdc++-v3/libsupc++/vterminate.cc:95: référence indéfinie vers « fwrite »
/usr/local/pspdev/lib/gcc/psp/4.0.1/../../../../psp/lib/libstdc++.a(vterminate.o):../../../../libstdc++-v3/libsupc++/vterminate.cc:87: référence indéfinie vers « _impure_ptr »
/usr/local/pspdev/lib/gcc/psp/4.0.1/../../../../psp/lib/libstdc++.a(vterminate.o):../../../../libstdc++-v3/libsupc++/vterminate.cc:87: relocalisation tronquée pour concorder: R_MIPS_GPREL16 avec _impure_ptr
/usr/local/pspdev/lib/gcc/psp/4.0.1/../../../../psp/lib/libstdc++.a(vterminate.o):../../../../libstdc++-v3/libsupc++/vterminate.cc:87: référence indéfinie vers « fwrite »
/usr/local/pspdev/lib/gcc/psp/4.0.1/../../../../psp/lib/libstdc++.a(vterminate.o):../../../../libstdc++-v3/libsupc++/vterminate.cc:88: référence indéfinie vers « _impure_ptr »
/usr/local/pspdev/lib/gcc/psp/4.0.1/../../../../psp/lib/libstdc++.a(vterminate.o):../../../../libstdc++-v3/libsupc++/vterminate.cc:88: relocalisation tronquée pour concorder: R_MIPS_GPREL16 avec _impure_ptr
/usr/local/pspdev/lib/gcc/psp/4.0.1/../../../../psp/lib/libstdc++.a(vterminate.o):../../../../libstdc++-v3/libsupc++/vterminate.cc:88: référence indéfinie vers « fputs »
/usr/local/pspdev/lib/gcc/psp/4.0.1/../../../../psp/lib/libstdc++.a(vterminate.o):../../../../libstdc++-v3/libsupc++/vterminate.cc:89: référence indéfinie vers « _impure_ptr »
/usr/local/pspdev/lib/gcc/psp/4.0.1/../../../../psp/lib/libstdc++.a(vterminate.o):../../../../libstdc++-v3/libsupc++/vterminate.cc:89: relocalisation tronquée pour concorder: R_MIPS_GPREL16 avec _impure_ptr
/usr/local/pspdev/lib/gcc/psp/4.0.1/../../../../psp/lib/libstdc++.a(vterminate.o):../../../../libstdc++-v3/libsupc++/vterminate.cc:89: référence indéfinie vers « fputc »
/usr/local/pspdev/lib/gcc/psp/4.0.1/../../../../psp/lib/libstdc++.a(cp-demangle.o): dans la fonction « d_identifier »:
cp-demangle.c:(.text+0x1538): référence indéfinie vers « memcmp »
/usr/local/pspdev/lib/gcc/psp/4.0.1/../../../../psp/lib/libstdc++.a(cp-demangle.o): dans la fonction « d_expression »:
cp-demangle.c:(.text+0x3324): référence indéfinie vers « strcmp »
/usr/local/pspdev/lib/gcc/psp/4.0.1/../../../../psp/lib/libstdc++.a(cp-demangle.o): dans la fonction « d_demangle »:
cp-demangle.c:(.text+0x8fd8): référence indéfinie vers « strncmp »
cp-demangle.c:(.text+0x9268): référence indéfinie vers « strcat »
/usr/local/pspdev/lib/gcc/psp/4.0.1/../../../../psp/lib/libstdc++.a(cp-demangle.o): dans la fonction « __cxa_demangle »:
cp-demangle.c:(.text+0x95d4): référence indéfinie vers « strcpy »
collect2: ld a retourné 1 code d'état d'exécution
make: *** [tawaGL] Erreur 1
i fixed errors "undefine reference to __psp_log(char const*, ...) into main.cpp
i have change
by
but for others ?
i have change
Code: Select all
extern void __psp_log (const char *fmt, ...);
Code: Select all
extern "C" void __psp_log (const char *fmt, ...);
Code: Select all
object.o:/home/pm/devPSP/pspgl/tawaGL/object.cpp:91: référence indéfinie vers « glCallList »
object.o:/home/pm/devPSP/pspgl/tawaGL/object.cpp:103: référence indéfinie vers « glNewList »
object.o:/home/pm/devPSP/pspgl/tawaGL/object.cpp:139: référence indéfinie vers « glEndList »
object.o:/home/pm/devPSP/pspgl/tawaGL/object.cpp:139: référence indéfinie vers « glEndList »
Code: Select all
../libGL.a(glMaterial.o): dans la fonction « glMaterialf »:
/tmp/pspdev/pspsdk/pspgl/glMaterial.c:36: référence indéfinie vers « glGetMaterialfv »
Code: Select all
/usr/local/pspdev/lib/gcc/psp/4.0.1/../../../../psp/lib/libstdc++.a(vterminate.o):../../../../libstdc++-v3/libsupc++/vterminate.cc:69: référence indéfinie vers « _impure_ptr »
/usr/local/pspdev/lib/gcc/psp/4.0.1/../../../../psp/lib/libstdc++.a(vterminate.o):../../../../libstdc++-v3/libsupc++/vterminate.cc:69: relocalisation tronquée pour concorder: R_MIPS_GPREL16 avec _impure_ptr
/usr/local/pspdev/lib/gcc/psp/4.0.1/../../../../psp/lib/libstdc++.a(vterminate.o):../../../../libstdc++-v3/libsupc++/vterminate.cc:69: référence indéfinie vers « fwrite »
/usr/local/pspdev/lib/gcc/psp/4.0.1/../../../../psp/lib/libstdc++.a(vterminate.o):../../../../libstdc++-v3/libsupc++/vterminate.cc:70: référence indéfinie vers « _impure_ptr »
/usr/local/pspdev/lib/gcc/psp/4.0.1/../../../../psp/lib/libstdc++.a(vterminate.o):../../../../libstdc++-v3/libsupc++/vterminate.cc:70: relocalisation tronquée pour concorder: R_MIPS_GPREL16 avec _impure_ptr
/usr/local/pspdev/lib/gcc/psp/4.0.1/../../../../psp/lib/libstdc++.a(vterminate.o):../../../../libstdc++-v3/libsupc++/vterminate.cc:71: référence indéfinie vers « fputs »
/usr/local/pspdev/lib/gcc/psp/4.0.1/../../../../psp/lib/libstdc++.a(vterminate.o):../../../../libstdc++-v3/libsupc++/vterminate.cc:74: référence indéfinie vers « _impure_ptr »
/usr/local/pspdev/lib/gcc/psp/4.0.1/../../../../psp/lib/libstdc++.a(vterminate.o):../../../../libstdc++-v3/libsupc++/vterminate.cc:74: relocalisation tronquée pour concorder: R_MIPS_GPREL16 avec _impure_ptr
/usr/local/pspdev/lib/gcc/psp/4.0.1/../../../../psp/lib/libstdc++.a(vterminate.o):../../../../libstdc++-v3/libsupc++/vterminate.cc:74: référence indéfinie vers « fwrite »
/usr/local/pspdev/lib/gcc/psp/4.0.1/../../../../psp/lib/libstdc++.a(vterminate.o):../../../../libstdc++-v3/libsupc++/vterminate.cc:73: référence indéfinie vers « fputs »
/usr/local/pspdev/lib/gcc/psp/4.0.1/../../../../psp/lib/libstdc++.a(vterminate.o):../../../../libstdc++-v3/libsupc++/vterminate.cc:74: référence indéfinie vers « _impure_ptr »
/usr/local/pspdev/lib/gcc/psp/4.0.1/../../../../psp/lib/libstdc++.a(vterminate.o):../../../../libstdc++-v3/libsupc++/vterminate.cc:74: relocalisation tronquée pour concorder: R_MIPS_GPREL16 avec _impure_ptr
/usr/local/pspdev/lib/gcc/psp/4.0.1/../../../../psp/lib/libstdc++.a(vterminate.o):../../../../libstdc++-v3/libsupc++/vterminate.cc:74: référence indéfinie vers « fwrite »
/usr/local/pspdev/lib/gcc/psp/4.0.1/../../../../psp/lib/libstdc++.a(vterminate.o):../../../../libstdc++-v3/libsupc++/vterminate.cc:51: référence indéfinie vers « _impure_ptr »
/usr/local/pspdev/lib/gcc/psp/4.0.1/../../../../psp/lib/libstdc++.a(vterminate.o):../../../../libstdc++-v3/libsupc++/vterminate.cc:51: relocalisation tronquée pour concorder: R_MIPS_GPREL16 avec _impure_ptr
/usr/local/pspdev/lib/gcc/psp/4.0.1/../../../../psp/lib/libstdc++.a(vterminate.o):../../../../libstdc++-v3/libsupc++/vterminate.cc:51: référence indéfinie vers « fwrite »
/usr/local/pspdev/lib/gcc/psp/4.0.1/../../../../psp/lib/libstdc++.a(vterminate.o):../../../../libstdc++-v3/libsupc++/vterminate.cc:95: référence indéfinie vers « _impure_ptr »
/usr/local/pspdev/lib/gcc/psp/4.0.1/../../../../psp/lib/libstdc++.a(vterminate.o):../../../../libstdc++-v3/libsupc++/vterminate.cc:95: relocalisation tronquée pour concorder: R_MIPS_GPREL16 avec _impure_ptr
/usr/local/pspdev/lib/gcc/psp/4.0.1/../../../../psp/lib/libstdc++.a(vterminate.o):../../../../libstdc++-v3/libsupc++/vterminate.cc:95: référence indéfinie vers « fwrite »
/usr/local/pspdev/lib/gcc/psp/4.0.1/../../../../psp/lib/libstdc++.a(vterminate.o):../../../../libstdc++-v3/libsupc++/vterminate.cc:87: référence indéfinie vers « _impure_ptr »
/usr/local/pspdev/lib/gcc/psp/4.0.1/../../../../psp/lib/libstdc++.a(vterminate.o):../../../../libstdc++-v3/libsupc++/vterminate.cc:87: relocalisation tronquée pour concorder: R_MIPS_GPREL16 avec _impure_ptr
/usr/local/pspdev/lib/gcc/psp/4.0.1/../../../../psp/lib/libstdc++.a(vterminate.o):../../../../libstdc++-v3/libsupc++/vterminate.cc:87: référence indéfinie vers « fwrite »
/usr/local/pspdev/lib/gcc/psp/4.0.1/../../../../psp/lib/libstdc++.a(vterminate.o):../../../../libstdc++-v3/libsupc++/vterminate.cc:88: référence indéfinie vers « _impure_ptr »
/usr/local/pspdev/lib/gcc/psp/4.0.1/../../../../psp/lib/libstdc++.a(vterminate.o):../../../../libstdc++-v3/libsupc++/vterminate.cc:88: relocalisation tronquée pour concorder: R_MIPS_GPREL16 avec _impure_ptr
/usr/local/pspdev/lib/gcc/psp/4.0.1/../../../../psp/lib/libstdc++.a(vterminate.o):../../../../libstdc++-v3/libsupc++/vterminate.cc:88: référence indéfinie vers « fputs »
/usr/local/pspdev/lib/gcc/psp/4.0.1/../../../../psp/lib/libstdc++.a(vterminate.o):../../../../libstdc++-v3/libsupc++/vterminate.cc:89: référence indéfinie vers « _impure_ptr »
/usr/local/pspdev/lib/gcc/psp/4.0.1/../../../../psp/lib/libstdc++.a(vterminate.o):../../../../libstdc++-v3/libsupc++/vterminate.cc:89: relocalisation tronquée pour concorder: R_MIPS_GPREL16 avec _impure_ptr
/usr/local/pspdev/lib/gcc/psp/4.0.1/../../../../psp/lib/libstdc++.a(vterminate.o):../../../../libstdc++-v3/libsupc++/vterminate.cc:89: référence indéfinie vers « fputc »
/usr/local/pspdev/lib/gcc/psp/4.0.1/../../../../psp/lib/libstdc++.a(cp-demangle.o): dans la fonction « d_identifier »:
cp-demangle.c:(.text+0x1538): référence indéfinie vers « memcmp »
/usr/local/pspdev/lib/gcc/psp/4.0.1/../../../../psp/lib/libstdc++.a(cp-demangle.o): dans la fonction « d_expression »:
cp-demangle.c:(.text+0x3324): référence indéfinie vers « strcmp »
/usr/local/pspdev/lib/gcc/psp/4.0.1/../../../../psp/lib/libstdc++.a(cp-demangle.o): dans la fonction « d_demangle »:
cp-demangle.c:(.text+0x8fd8): référence indéfinie vers « strncmp »
cp-demangle.c:(.text+0x9268): référence indéfinie vers « strcat »
/usr/local/pspdev/lib/gcc/psp/4.0.1/../../../../psp/lib/libstdc++.a(cp-demangle.o): dans la fonction « __cxa_demangle »:
cp-demangle.c:(.text+0x95d4): référence indéfinie vers « strcpy »
collect2: ld a retourné 1 code d'état d'exécution
make: *** [tawaGL] Erreur 1
What is this program? Are you writing it from scratch, or porting it from some other platform?
Also, it might be helpful if you switch to an English locale when posting error messages. My French is good enough to guess at what errors you're getting, but English would be easier.
ok, i will try to think to change my locale before posting errors ;)
This program is as port from my first and only one OpenGL experience under linux.
now (after adding -lc)
ok for gl*List errors, i will try to change that later, but for the others errors, it miss an other lib ?
This program is as port from my first and only one OpenGL experience under linux.
now (after adding -lc)
Code: Select all
pm@power64 ~/devPSP/pspgl/tawaGL $ make
psp-gcc main.o tawa.o object.o light.o cam.o -g -Wall -O2 -DMODULE_NAME="tawaGL" psp-setup.c -L/usr/local/pspdev/psp/sdk/lib -L.. -lglut -lGLU -lGL -lm -lpspdebug -lpspge -lpspdisplay -lpspctrl -lpspsdk -lpsplibc -lpspuser -lpspkernel -lstdc++ -lc -o tawaGL
object.o:/home/pm/devPSP/pspgl/tawaGL/object.cpp:91: undefined reference to `glCallList'
object.o:/home/pm/devPSP/pspgl/tawaGL/object.cpp:103: undefined reference to `glNewList'
object.o:/home/pm/devPSP/pspgl/tawaGL/object.cpp:139: undefined reference to `glEndList'
object.o:/home/pm/devPSP/pspgl/tawaGL/object.cpp:139: undefined reference to `glEndList'
../libGL.a(glMaterial.o): In function `glMaterialf':
/tmp/pspdev/pspsdk/pspgl/glMaterial.c:36: undefined reference to `glGetMaterialfv'
/usr/local/pspdev/lib/gcc/psp/4.0.1/../../../../psp/lib/libc.a(chdir.o): In function `chdir':
../../../../../../newlib/libc/sys/psp/libcglue.c:77: undefined reference to `sceIoDopen'
../../../../../../newlib/libc/sys/psp/libcglue.c:82: undefined reference to `sceIoDclose'
../../../../../../newlib/libc/sys/psp/libcglue.c:84: undefined reference to `sceIoChdir'
/usr/local/pspdev/lib/gcc/psp/4.0.1/../../../../psp/lib/libc.a(_lseek.o): In function `_lseek':
../../../../../../newlib/libc/sys/psp/libcglue.c:227: undefined reference to `sceIoLseek'
/usr/local/pspdev/lib/gcc/psp/4.0.1/../../../../psp/lib/libc.a(_stat.o): In function `_stat':
../../../../../../newlib/libc/sys/psp/libcglue.c:487: undefined reference to `sceIoGetstat'
collect2: ld returned 1 exit status
make: *** [tawaGL] Error 1
Put -lc earlier in the line; the order matters. The sceIo* functions are in -lpspuser, and so it needs to be after -lc to satisfy its dependencies.FIF wrote:Code: Select all
pm@power64 ~/devPSP/pspgl/tawaGL $ make psp-gcc main.o tawa.o object.o light.o cam.o -g -Wall -O2 -DMODULE_NAME="tawaGL" psp-setup.c -L/usr/local/pspdev/psp/sdk/lib -L.. -lglut -lGLU -lGL -lm -lpspdebug -lpspge -lpspdisplay -lpspctrl -lpspsdk -lpsplibc -lpspuser -lpspkernel -lstdc++ -lc -o tawaGL
like that it's good now
Thank you very much for all the time you spend with me.
Code: Select all
pm@power64 ~/devPSP/pspgl/tawaGL $ make
psp-gcc main.o tawa.o object.o light.o cam.o -g -Wall -O2 -DMODULE_NAME="tawaGL" psp-setup.c -L/usr/local/pspdev/psp/sdk/lib -L.. -lglut -lGLU -lGL -lm -lpspdebug -lpspge -lpspdisplay -lpspctrl -lpspsdk -lpsplibc -lstdc++ -lc -lpspuser -lpspkernel -o tawaGL
I pass to compile my app, but it crash:
What can i do with that ? how interpret this data ?
Code: Select all
Exception - Bus error (data)
EPC - 08909280
Cause - 0000001C
STATUS - 60008613
BadVAddr - 0402EDD8
zr ..............
..........
First thing is to find out what function actually caused the crash. Use to get a list of symbols for your program. The address 08909280 will (with luck) be in one of them. Then you need to work out which memory reference actually caused the fault.
The fault address is 0402EDD8, which interesting because it's near (in?) VRAM rather than system memory. I'm not sure what that means.
Code: Select all
psp-nm -n <your executable>
The fault address is 0402EDD8, which interesting because it's near (in?) VRAM rather than system memory. I'm not sure what that means.
Code: Select all
0000000008909270 T fread
Code: Select all
// LECTURE DES VERTEX
sprintf(FileName,"/OBJECT/%s.vtx",NomFichiers);
fIn=fopen(FileName,"rb");
fread(&gliNbVertex,1,sizeof(GLint),fIn);
glfVertex=(GLfloat*)malloc(3*gliNbVertex*sizeof(GLfloat));
glfTmp=glfVertex;
for(gliCpt=0;gliCpt<gliNbVertex*3;gliCpt++)
fread(glfTmp++,1,sizeof(GLfloat),fIn);
fclose(fIn);
Can i use fopen,fread,fclose functions ? or i must change by sceIoOpen... ?
Can i open a file with lowercase filename?
My general approach is to make the program also compilable/runnable on my desktop machine, and get it basically working there. Once you're happy, then compile/run it for the PSP.
Obviously you'll need a couple of changes, but you should be able to get it mostly the same. That's one of the reasons I'm working on PSPGL: so that a lot of the basic stuff can be done in a friendlier environment.
There are many ways in which you can end up with a blank screen. Look at:
Obviously you'll need a couple of changes, but you should be able to get it mostly the same. That's one of the reasons I'm working on PSPGL: so that a lot of the basic stuff can be done in a friendlier environment.
There are many ways in which you can end up with a blank screen. Look at:
- transforms (projection and modelview)
- depth tests
- other tests
i done modifications on my linux version before, see the result, and integrate them into psp version
I have change the clearcolor to blue, and i can see my Tawa (my character) on screen but it's all black. On my linux version without glGetMaterialfv, i can see my character in grayscale. I suppose it's a light problem.
I have change the clearcolor to blue, and i can see my Tawa (my character) on screen but it's all black. On my linux version without glGetMaterialfv, i can see my character in grayscale. I suppose it's a light problem.
exactly, at home i have svn version
but here at work, i have http://www.goop.org/psp/gl version but it crash. I can't explore more here, i will see that this evening.
thanks for your PM ;)
but here at work, i have http://www.goop.org/psp/gl version but it crash. I can't explore more here, i will see that this evening.
thanks for your PM ;)
i juste download pspgl-jsgf-b084ece3a4a6 but, it seems missing some files:
- glDrawSplineArrays.c
- glDrawSplineElements.c
- glWeightPointerPSP.c
And compiling test-glut give me:
After add -lpsprtc into the makefile:
- glDrawSplineArrays.c
- glDrawSplineElements.c
- glWeightPointerPSP.c
And compiling test-glut give me:
Code: Select all
pm@power64 ~/devPSP/pspgl-jsgf-b084ece3a4a6 $ make -C test-glut
make: Entering directory `/home/pm/devPSP/pspgl-jsgf-b084ece3a4a6/test-glut'
psp-gcc simple.o -g -Wall -O2 -DMODULE_NAME="test-glut" psp-setup.c -L/usr/local/pspdev/psp/sdk/lib -L.. -lglut -lGLU -lGL -lm -lpspdebug -lpspge -lpspdisplay -lpspctrl -lpspsdk -lpsplibc -lpspuser -lpspkernel -o glut-simple
simple.o: In function `reshape':
/home/pm/devPSP/pspgl-jsgf-b084ece3a4a6/test-glut/simple.c:35: undefined reference to `__psp_log'
/home/pm/devPSP/pspgl-jsgf-b084ece3a4a6/test-glut/simple.c:34: undefined reference to `__psp_log'
/home/pm/devPSP/pspgl-jsgf-b084ece3a4a6/test-glut/simple.c:33: undefined reference to `__psp_log'
/home/pm/devPSP/pspgl-jsgf-b084ece3a4a6/test-glut/simple.c:32: undefined reference to `__psp_log'
/home/pm/devPSP/pspgl-jsgf-b084ece3a4a6/test-glut/simple.c:31: undefined reference to `__psp_log'
simple.o:/home/pm/devPSP/pspgl-jsgf-b084ece3a4a6/test-glut/simple.c:30: more undefined references to `__psp_log' follow
../libGL.a(pspgl_dlist.o): In function `now':
/home/pm/devPSP/pspgl-jsgf-b084ece3a4a6/pspgl_internal.h:233: undefined reference to `sceRtcGetCurrentTick'
/home/pm/devPSP/pspgl-jsgf-b084ece3a4a6/pspgl_internal.h:233: undefined reference to `sceRtcGetCurrentTick'
../libGL.a(pspgl_vidmem.o): In function `now':
/home/pm/devPSP/pspgl-jsgf-b084ece3a4a6/pspgl_internal.h:233: undefined reference to `sceRtcGetCurrentTick'
../libGL.a(pspgl_vidmem.o): In function `__pspgl_vidmem_setup_write_and_display_buffer':
/home/pm/devPSP/pspgl-jsgf-b084ece3a4a6/pspgl_internal.h:233: undefined reference to `sceRtcGetCurrentTick'
/home/pm/devPSP/pspgl-jsgf-b084ece3a4a6/pspgl_internal.h:233: undefined reference to `sceRtcGetCurrentTick'
collect2: ld returned 1 exit status
make: *** [glut-simple] Error 1
make: Leaving directory `/home/pm/devPSP/pspgl-jsgf-b084ece3a4a6/test-glut'
Code: Select all
pm@power64 ~/devPSP/pspgl-jsgf-b084ece3a4a6/test-glut $ make
psp-gcc simple.o -g -Wall -O2 -DMODULE_NAME="test-glut" psp-setup.c -L/usr/local/pspdev/psp/sdk/lib -L.. -lglut -lGLU -lGL -lm -lpspdebug -lpspge -lpspdisplay -lpspctrl -lpspsdk -lpsplibc -lpspuser -lpspkernel -lpsprtc -o glut-simple
simple.o: In function `reshape':
/home/pm/devPSP/pspgl-jsgf-b084ece3a4a6/test-glut/simple.c:35: undefined reference to `__psp_log'
/home/pm/devPSP/pspgl-jsgf-b084ece3a4a6/test-glut/simple.c:34: undefined reference to `__psp_log'
/home/pm/devPSP/pspgl-jsgf-b084ece3a4a6/test-glut/simple.c:33: undefined reference to `__psp_log'
/home/pm/devPSP/pspgl-jsgf-b084ece3a4a6/test-glut/simple.c:32: undefined reference to `__psp_log'
/home/pm/devPSP/pspgl-jsgf-b084ece3a4a6/test-glut/simple.c:31: undefined reference to `__psp_log'
simple.o:/home/pm/devPSP/pspgl-jsgf-b084ece3a4a6/test-glut/simple.c:30: more undefined references to `__psp_log' follow
collect2: ld returned 1 exit status
make: *** [glut-simple] Error 1
Hm, have to look into that.FIF wrote:i juste download pspgl-jsgf-b084ece3a4a6 but, it seems missing some files:
- glDrawSplineArrays.c
- glDrawSplineElements.c
- glWeightPointerPSP.c
This got renamed to __pspgl_log (all private symbols start with __pspgl_).Code: Select all
/home/pm/devPSP/pspgl-jsgf-b084ece3a4a6/test-glut/simple.c:35: undefined reference to `__psp_log'
I want to remove the dependence on -lpsprtc, but it hasn't been a priority so far.
Hm, I think test-glut must have been broken for a while. It was drawing outside the front and back clipping planes, so its not too surprising nothing appeared (though it does on other GLs, so I'm not quite sure how this is supposed to work...). The other tests should work fine, including your program.
Anyway, that's fixed, along with the other missing files you reported.
Anyway, that's fixed, along with the other missing files you reported.