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 

where and how get PSPGL

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



Joined: 30 Sep 2005
Posts: 20
Location: France

PostPosted: Wed Oct 19, 2005 4:43 am    Post subject: where and how get PSPGL Reply with quote

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
Back to top
View user's profile Send private message MSN Messenger
jsgf



Joined: 12 Jul 2005
Posts: 254

PostPosted: Wed Oct 19, 2005 9:53 am    Post subject: Reply with quote

Yes, you can download a .zip file of the current source of PSPGL from http://hg.goop.org/pspgl/jsgf?cmd=archive;node=working;type=zip. You can compile and install it with the normal SDK tools.
Back to top
View user's profile Send private message Visit poster's website
choupette



Joined: 12 Oct 2005
Posts: 7

PostPosted: Wed Oct 19, 2005 5:14 pm    Post subject: Reply with quote

svn co svn://svn.pspdev.org/psp/trunk/pspgl/

allows to dowload it from, huh it's obvious.
Back to top
View user's profile Send private message
jsgf



Joined: 12 Jul 2005
Posts: 254

PostPosted: Wed Oct 19, 2005 6:07 pm    Post subject: Reply with quote

The goop.org one is probably the one you want. The svn one has lots of bugs and pitfalls.
Back to top
View user's profile Send private message Visit poster's website
FIF



Joined: 30 Sep 2005
Posts: 20
Location: France

PostPosted: Wed Oct 19, 2005 8:26 pm    Post subject: Reply with quote

Thanks a lot, i will try that this evening
Back to top
View user's profile Send private message MSN Messenger
FIF



Joined: 30 Sep 2005
Posts: 20
Location: France

PostPosted: Thu Oct 20, 2005 1:44 am    Post subject: Reply with quote

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++?
Back to top
View user's profile Send private message MSN Messenger
FIF



Joined: 30 Sep 2005
Posts: 20
Location: France

PostPosted: Thu Oct 20, 2005 2:47 am    Post subject: Reply with quote

it seems, it use g++ and not psp-g++

how change that ?
Back to top
View user's profile Send private message MSN Messenger
jsgf



Joined: 12 Jul 2005
Posts: 254

PostPosted: Thu Oct 20, 2005 3:08 am    Post subject: Reply with quote

You need to change your makefile to set your compiler to psp-g++.
Back to top
View user's profile Send private message Visit poster's website
FIF



Joined: 30 Sep 2005
Posts: 20
Location: France

PostPosted: Thu Oct 20, 2005 4:10 am    Post subject: Reply with quote

ok, thanks for that

i have change the makefile like this:
Code:

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


but now, i have many errors now:

Code:

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
Back to top
View user's profile Send private message MSN Messenger
FIF



Joined: 30 Sep 2005
Posts: 20
Location: France

PostPosted: Thu Oct 20, 2005 4:17 am    Post subject: Reply with quote

i fixed errors "undefine reference to __psp_log(char const*, ...) into main.cpp

i have change
Code:

extern void __psp_log (const char *fmt, ...);

by
Code:

extern "C" void __psp_log (const char *fmt, ...);


but for others ?
Back to top
View user's profile Send private message MSN Messenger
jsgf



Joined: 12 Jul 2005
Posts: 254

PostPosted: Thu Oct 20, 2005 4:35 am    Post subject: Reply with quote

Code:

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 »

PSPGL doesn't support display lists at the moment. It may not ever; they're pretty complex to implement, and OpenGL/ES (which is the basis of PSPGL) doesn't have them.
Code:

../libGL.a(glMaterial.o): dans la fonction « glMaterialf »:
/tmp/pspdev/pspsdk/pspgl/glMaterial.c:36: référence indéfinie vers « glGetMaterialfv »

GetMaterial isn't done yet. A lot of the glGet* functions are missing or incomplete.

Code:
/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

This all looks like newlibc stuff. Um, I'll need to check what the right link line is for this. Try putting "-lc" somewhere early in the -l list on the link line.

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.
Back to top
View user's profile Send private message Visit poster's website
FIF



Joined: 30 Sep 2005
Posts: 20
Location: France

PostPosted: Thu Oct 20, 2005 4:48 am    Post subject: Reply with quote

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)
Code:

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


ok for gl*List errors, i will try to change that later, but for the others errors, it miss an other lib ?
Back to top
View user's profile Send private message MSN Messenger
jsgf



Joined: 12 Jul 2005
Posts: 254

PostPosted: Thu Oct 20, 2005 4:56 am    Post subject: Reply with quote

FIF wrote:

Code:

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


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.
Back to top
View user's profile Send private message Visit poster's website
FIF



Joined: 30 Sep 2005
Posts: 20
Location: France

PostPosted: Thu Oct 20, 2005 5:02 am    Post subject: Reply with quote

like that it's good now
Code:

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


Thank you very much for all the time you spend with me.
Back to top
View user's profile Send private message MSN Messenger
FIF



Joined: 30 Sep 2005
Posts: 20
Location: France

PostPosted: Thu Oct 20, 2005 5:57 am    Post subject: Reply with quote

I pass to compile my app, but it crash:

Code:

Exception - Bus error (data)
EPC - 08909280
Cause - 0000001C
STATUS - 60008613
BadVAddr - 0402EDD8
zr ..............
..........


What can i do with that ? how interpret this data ?
Back to top
View user's profile Send private message MSN Messenger
jsgf



Joined: 12 Jul 2005
Posts: 254

PostPosted: Thu Oct 20, 2005 7:04 am    Post subject: Reply with quote

First thing is to find out what function actually caused the crash. Use
Code:
psp-nm -n <your executable>
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.
Back to top
View user's profile Send private message Visit poster's website
FIF



Joined: 30 Sep 2005
Posts: 20
Location: France

PostPosted: Thu Oct 20, 2005 7:25 am    Post subject: Reply with quote

Code:

0000000008909270 T fread


Into my program, i load vertices,polygons,normals and materials from files.
Code:

// 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?
Back to top
View user's profile Send private message MSN Messenger
FIF



Joined: 30 Sep 2005
Posts: 20
Location: France

PostPosted: Thu Oct 20, 2005 7:30 am    Post subject: Reply with quote

i'm very stupid, i forgot to put ms0: into my filenames :D

now, it run, but i don't see anything on screen ???
Back to top
View user's profile Send private message MSN Messenger
jsgf



Joined: 12 Jul 2005
Posts: 254

PostPosted: Thu Oct 20, 2005 7:36 am    Post subject: Reply with quote

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:
  1. transforms (projection and modelview)
  2. depth tests
  3. other tests

It's quite possible there's a bug in PSPGL, but I'd verify that your program does something sensible on a desktop before jumping to conclusions.
Back to top
View user's profile Send private message Visit poster's website
FIF



Joined: 30 Sep 2005
Posts: 20
Location: France

PostPosted: Thu Oct 20, 2005 7:45 am    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message MSN Messenger
jsgf



Joined: 12 Jul 2005
Posts: 254

PostPosted: Thu Oct 20, 2005 8:28 am    Post subject: Reply with quote

What kind of lighting are you using? Are your normals set up right.

How are you drawing? With vertex arrays or begin/end?
Back to top
View user's profile Send private message Visit poster's website
FIF



Joined: 30 Sep 2005
Posts: 20
Location: France

PostPosted: Thu Oct 20, 2005 8:46 am    Post subject: Reply with quote

I use spotligth, glBegin/glEnd method, normals are set up

I can send you my job if you PM my your email address.
Back to top
View user's profile Send private message MSN Messenger
jsgf



Joined: 12 Jul 2005
Posts: 254

PostPosted: Thu Oct 20, 2005 10:36 am    Post subject: Reply with quote

I got it working, but make sure you're using the goop.org PSPGL; the SVN one has very incomplete lighting support.
Back to top
View user's profile Send private message Visit poster's website
FIF



Joined: 30 Sep 2005
Posts: 20
Location: France

PostPosted: Thu Oct 20, 2005 6:16 pm    Post subject: Reply with quote

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 ;)
Back to top
View user's profile Send private message MSN Messenger
FIF



Joined: 30 Sep 2005
Posts: 20
Location: France

PostPosted: Thu Oct 20, 2005 9:25 pm    Post subject: Reply with quote

i juste download pspgl-jsgf-b084ece3a4a6 but, it seems missing some files:
- glDrawSplineArrays.c
- glDrawSplineElements.c
- glWeightPointerPSP.c

And compiling test-glut give me:
Code:

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'


After add -lpsprtc into the makefile:
Code:

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
Back to top
View user's profile Send private message MSN Messenger
jsgf



Joined: 12 Jul 2005
Posts: 254

PostPosted: Fri Oct 21, 2005 3:28 am    Post subject: Reply with quote

FIF wrote:
i juste download pspgl-jsgf-b084ece3a4a6 but, it seems missing some files:
- glDrawSplineArrays.c
- glDrawSplineElements.c
- glWeightPointerPSP.c

Hm, have to look into that.
Quote:
Code:

/home/pm/devPSP/pspgl-jsgf-b084ece3a4a6/test-glut/simple.c:35: undefined reference to `__psp_log'

This got renamed to __pspgl_log (all private symbols start with __pspgl_).

I want to remove the dependence on -lpsprtc, but it hasn't been a priority so far.
Back to top
View user's profile Send private message Visit poster's website
FIF



Joined: 30 Sep 2005
Posts: 20
Location: France

PostPosted: Fri Oct 21, 2005 7:30 pm    Post subject: Reply with quote

after fix all compiling problems with pspgl-jsgf-b084ece3a4a6 version, the test-glut isn't showing the rotating triangle on psp screen, can you take a look to that ?
Back to top
View user's profile Send private message MSN Messenger
jsgf



Joined: 12 Jul 2005
Posts: 254

PostPosted: Sat Oct 22, 2005 2:19 am    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message Visit poster's website
FIF



Joined: 30 Sep 2005
Posts: 20
Location: France

PostPosted: Sat Oct 22, 2005 4:04 am    Post subject: Reply with quote

I'm not at home now, i can't try others tests.
But with my program i have surprising result. I done the modification you explain me, but the result it's the same than no modification. Can you send me the elf (or eboot) you have compil ?
Back to top
View user's profile Send private message MSN Messenger
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