Help with pspsdk!
-
- Posts: 41
- Joined: Mon Mar 19, 2007 6:27 pm
Help with pspsdk!
Hi!
I've been all the day trying to make pspsdk work properly under ubuntu 6.10, after solving many problems, the one still belongs is:
I cannot complie any file from /home for example:
root@BIG-BILL:/home/guillermo/cube# make
psp-gcc -I. -I/usr/local/pspdev/psp/sdk/include -G0 -Wall -D_PSP_FW_VERSION=150 -c -o cube.o cube.c
cube.c:20:33: error: ../common/callbacks.h: No existe el fichero ó directorio
cube.c:21:28: error: ../common/vram.h: No existe el fichero ó directorio
cube.c: En la función ‘main’:
cube.c:93: aviso: declaración implícita de la función ‘setupCallbacks’
cube.c:97: aviso: declaración implícita de la función ‘getStaticVramBuffer’
cube.c:97: aviso: la inicialización crea un puntero desde un entero sin una conversión
cube.c:98: aviso: la inicialización crea un puntero desde un entero sin una conversión
cube.c:99: aviso: la inicialización crea un puntero desde un entero sin una conversión
cube.c:129: aviso: declaración implícita de la función ‘running’
make: *** [cube.o] Error 1
I guess it must have something to do with the path, I set it in /etc/bash.bashrc as follows :
export PSPDEV="/usr/local/pspdev"
export PATH="$PATH:$PSPDEV/bin"
I also put the same in /home/.bashrc and also tried it in /home/.bash_profile but never worked.
The strangest thing is that i can compile every sample of the sdk doing it from:
/usr/local/pspdev/psp/sdk/samples/whatever.
Somebody help please
I've been all the day trying to make pspsdk work properly under ubuntu 6.10, after solving many problems, the one still belongs is:
I cannot complie any file from /home for example:
root@BIG-BILL:/home/guillermo/cube# make
psp-gcc -I. -I/usr/local/pspdev/psp/sdk/include -G0 -Wall -D_PSP_FW_VERSION=150 -c -o cube.o cube.c
cube.c:20:33: error: ../common/callbacks.h: No existe el fichero ó directorio
cube.c:21:28: error: ../common/vram.h: No existe el fichero ó directorio
cube.c: En la función ‘main’:
cube.c:93: aviso: declaración implícita de la función ‘setupCallbacks’
cube.c:97: aviso: declaración implícita de la función ‘getStaticVramBuffer’
cube.c:97: aviso: la inicialización crea un puntero desde un entero sin una conversión
cube.c:98: aviso: la inicialización crea un puntero desde un entero sin una conversión
cube.c:99: aviso: la inicialización crea un puntero desde un entero sin una conversión
cube.c:129: aviso: declaración implícita de la función ‘running’
make: *** [cube.o] Error 1
I guess it must have something to do with the path, I set it in /etc/bash.bashrc as follows :
export PSPDEV="/usr/local/pspdev"
export PATH="$PATH:$PSPDEV/bin"
I also put the same in /home/.bashrc and also tried it in /home/.bash_profile but never worked.
The strangest thing is that i can compile every sample of the sdk doing it from:
/usr/local/pspdev/psp/sdk/samples/whatever.
Somebody help please
-
- Posts: 376
- Joined: Wed May 10, 2006 11:31 pm
-
- Posts: 41
- Joined: Mon Mar 19, 2007 6:27 pm
The error messages I posted above are from the compiling process of one of the samples provided with the PSPSDK. I've compiled the same sample placed in /usr/local/pspdev/psp/sdk/samples/gu/cube and everything went all right. That's the reason why i'm thinking about something to do with the path, but i have looked all over the internet and I've used a couple of paths and never work.
As I said i've got ubuntu edgy and i have got a partition for the "/home" directory diferent from the "/" one, may the path should have to be in a particular way for the case you are routing to another partition?
As I said i've got ubuntu edgy and i have got a partition for the "/home" directory diferent from the "/" one, may the path should have to be in a particular way for the case you are routing to another partition?
everlasting, I'd advised you to write your own functions. Callbacks and Vram just examples.
In Vram.h you can find:
-I$(PSPSDK)/samples/gu/common
In Vram.h you can find:
But if you still want to use them, try add to CFLAGS in makefile/*
The following are a few helperfunctions to help manage vram in gu-examples.
Do not use for your own code, it's better you manage it in your own way.
*/
-I$(PSPSDK)/samples/gu/common
When you copy /usr/local/pspdev/psp/sdk/samples/gu/cube to your home directory you also need to copy /usr/local/pspdev/psp/sdk/samples/gu/common
When your ~ has a copy of common and cube you can run make in the cube directory.
When your ~ has a copy of common and cube you can run make in the cube directory.
Code: Select all
mkdir -p ~/psptest
cp -a /usr/local/pspdev/psp/sdk/samples/gu/cube ~/psptest
cp -a /usr/local/pspdev/psp/sdk/samples/gu/common ~/psptest
cd psptest/cube
make
-
- Posts: 41
- Joined: Mon Mar 19, 2007 6:27 pm
-
- Posts: 41
- Joined: Mon Mar 19, 2007 6:27 pm
HI Cy-4Ah I'm very new programming the psp and i never made a makefile, i,ve added what you told me so now the makefile looks like this:
TARGET = envmap
OBJS = envmap.o env0.o ../common/callbacks.o ../common/geometry.o ../common/vram.o
INCDIR =
CFLAGS = -G0 -Wall -O2 -I$(PSPSDK)/samples/gu/common
CXXFLAGS = $(CFLAGS) -fno-exceptions -fno-rtti
ASFLAGS = $(CFLAGS)
LIBDIR =
LDFLAGS =
LIBS= -lpspgum -lpspgu -lm
EXTRA_TARGETS = EBOOT.PBP
PSP_EBOOT_TITLE = Environment Mapping Sample
PSPSDK=$(shell psp-config --pspsdk-path)
include $(PSPSDK)/lib/build.mak
env0.o: env0.raw
bin2o -i env0.raw env0.o env0
I think this is what you told me to do but i'm not sure if i have to add anything else because it doesn't compile
TARGET = envmap
OBJS = envmap.o env0.o ../common/callbacks.o ../common/geometry.o ../common/vram.o
INCDIR =
CFLAGS = -G0 -Wall -O2 -I$(PSPSDK)/samples/gu/common
CXXFLAGS = $(CFLAGS) -fno-exceptions -fno-rtti
ASFLAGS = $(CFLAGS)
LIBDIR =
LDFLAGS =
LIBS= -lpspgum -lpspgu -lm
EXTRA_TARGETS = EBOOT.PBP
PSP_EBOOT_TITLE = Environment Mapping Sample
PSPSDK=$(shell psp-config --pspsdk-path)
include $(PSPSDK)/lib/build.mak
env0.o: env0.raw
bin2o -i env0.raw env0.o env0
I think this is what you told me to do but i'm not sure if i have to add anything else because it doesn't compile
Ok, than try this one:
There is exist more beautiful way indication of object files, but I don't know how:)
Code: Select all
TARGET = envmap
PSPSDK=$(shell psp-config --pspsdk-path)
COMMDIR=$(PSPSDK)/samples/gu/common
OBJS = envmap.o env0.o $(COMMDIR)/callbacks.o $(COMMDIR)/geometry.o $(COMMIR)/vram.o
INCDIR =
CFLAGS = -G0 -Wall -O2 -I$(COMMDIR)
CXXFLAGS = $(CFLAGS) -fno-exceptions -fno-rtti
ASFLAGS = $(CFLAGS)
LIBDIR =
LDFLAGS =
LIBS= -lpspgum -lpspgu -lm
EXTRA_TARGETS = EBOOT.PBP
PSP_EBOOT_TITLE = Environment Mapping Sample
include $(PSPSDK)/lib/build.mak
env0.o: env0.raw
bin2o -i env0.raw env0.o env0
This is probably the most comprehensive, free, reference you can get for make and makefiles.
http://www.gnu.org/software/make/manual/make.html
http://www.gnu.org/software/make/manual/make.html