| View previous topic :: View next topic |
| Author |
Message |
everlasting
Joined: 19 Mar 2007 Posts: 41
|
Posted: Mon Mar 19, 2007 6:53 pm Post subject: 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 |
|
| Back to top |
|
 |
Djakku
Joined: 30 Jan 2006 Posts: 45
|
Posted: Mon Mar 19, 2007 9:50 pm Post subject: |
|
|
| If you can compile properly the sample provided with the SDK maybe something is wrong with your makefile or cube.c file. I'm not a programmer but if you post them someone might be more helpfull |
|
| Back to top |
|
 |
Insert_witty_name
Joined: 10 May 2006 Posts: 376
|
Posted: Mon Mar 19, 2007 10:02 pm Post subject: |
|
|
| Quote: | 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 |
If you wish to move files before compiling them, you might want to make sure you take any files it relies on too. |
|
| Back to top |
|
 |
everlasting
Joined: 19 Mar 2007 Posts: 41
|
Posted: Tue Mar 20, 2007 12:32 am Post subject: |
|
|
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? |
|
| Back to top |
|
 |
Cy-4AH
Joined: 31 Jan 2007 Posts: 44 Location: Belarus
|
Posted: Tue Mar 20, 2007 1:24 am Post subject: |
|
|
everlasting, I'd advised you to write your own functions. Callbacks and Vram just examples.
In Vram.h you can find:
| Quote: | /*
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.
*/ |
But if you still want to use them, try add to CFLAGS in makefile
-I$(PSPSDK)/samples/gu/common |
|
| Back to top |
|
 |
Istari
Joined: 30 Sep 2005 Posts: 10
|
Posted: Tue Mar 20, 2007 1:50 am Post subject: |
|
|
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.
| Code: | 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 |
|
|
| Back to top |
|
 |
everlasting
Joined: 19 Mar 2007 Posts: 41
|
Posted: Tue Mar 20, 2007 2:11 am Post subject: |
|
|
| Thank you very much Istari, it worked. I'm very grateful. So if i would have copied any sample from any other folder except gu (cause most of them haven't got a common folder) it would have compiled? what a pity! Thanks again |
|
| Back to top |
|
 |
everlasting
Joined: 19 Mar 2007 Posts: 41
|
Posted: Tue Mar 20, 2007 2:48 am Post subject: |
|
|
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 |
|
| Back to top |
|
 |
Cy-4AH
Joined: 31 Jan 2007 Posts: 44 Location: Belarus
|
Posted: Tue Mar 20, 2007 3:15 am Post subject: |
|
|
Ok, than try this one:
| Code: | 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 |
There is exist more beautiful way indication of object files, but I don't know how:) |
|
| Back to top |
|
 |
Istari
Joined: 30 Sep 2005 Posts: 10
|
|
| Back to top |
|
 |
|