| View previous topic :: View next topic |
| Author |
Message |
GORETHRASHER
Joined: 10 Sep 2008 Posts: 12
|
Posted: Thu Sep 11, 2008 11:52 am Post subject: Just started - Please read |
|
|
Hi, I have finally managed to get a development environment set-up for the PSP.
I found Heimdall's post on the windows native toolchain, so I set it up last night. I am quite impressed, using the eclipse IDE you can get a pretty decent environment going.
I even managed to compile pspGL using eclipse, although you need a workaround, which I can detail later if anyone is interested.
So my question.
I tried creating a class
| Code: |
class nodeGE
{
public:
nodeGE() { m_parent = NULL; }
nodeGE( nodeGE* node ) { m_child = node; }
~nodeGE();
void init();
void setPos( int x, int y, int z );
void setPos( ScePspIVector3* vector );
void setRotation( int x, int y, int z );
void setRotation( ScePspIVector3* vector );
void setScale( int x, int y, int z );
void setScale( ScePspIVector3* vector );
private:
nodeGE* m_child;
ScePspIVector3 m_iv3_pos;
ScePspIVector3 m_iv3_rotation;
ScePspIVector3 m_iv3_scale;
};
|
which gives me an error
| Code: |
make all
psp-gcc -I. -IC:/pspsdk/psp/sdk/include -G0 -Wall -D_PSP_FW_VERSION=150 -c -o main.o main.c
In file included from objectGE.h:5,
from main.c:18:
nodeGE.h:6: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'nodeGE'
In file included from main.c:18:
|
I am suspecting I am missing some psp specific code. |
|
| Back to top |
|
 |
Noko
Joined: 06 Sep 2008 Posts: 23
|
Posted: Thu Sep 11, 2008 3:46 pm Post subject: |
|
|
| m_parent |
|
| Back to top |
|
 |
GORETHRASHER
Joined: 10 Sep 2008 Posts: 12
|
Posted: Thu Sep 11, 2008 3:57 pm Post subject: |
|
|
Indeed, that was an error in the code, but it's not what is causing the compile error. Even with an empty class
| Code: |
class nodeGE
{
public:
nodeGE() { }
~nodeGE(){ }
};
|
It gives the same error
Is there a difference in the compiler used for C and C++ ?
Here is the makefile if it helps
| Code: |
TARGET = lesson2
OBJS = main.o
CFLAGS = -O2 -G0 -Wall
CXXFLAGS = $(CFLAGS) -fno-exceptions -fno-rtti
ASFLAGS = $(CFLAGS)
PSPBIN = $(PSPSDK)/../bin
CFLAGS += -I$(PSPSDK)/../include -fsingle-precision-constant -g -Wall -O2
LIBS += -lglut -lGLU -lGL -lm -lc -lpsputility -lpspdebug -lpspge -lpspdisplay -lpspctrl -lpspsdk -lpspvfpu -lpsplibc -lpspuser -lpspkernel -lpsprtc -lpsppower -lstdc++
LDFLAGS += -DMODULE_NAME="lesson2" psp-setup.c
EXTRA_TARGETS = EBOOT.PBP
PSP_EBOOT_TITLE = LESSON2
# PSP_EBOOT_ICON = hero.png
# PSP_EBOOT_PIC1 = bg.png
PSPSDK=$(shell psp-config --pspsdk-path)
include $(PSPSDK)/lib/build.mak |
|
|
| Back to top |
|
 |
GORETHRASHER
Joined: 10 Sep 2008 Posts: 12
|
Posted: Thu Sep 11, 2008 4:22 pm Post subject: |
|
|
Turns out I was using a C project to try and compile C++ code.
Using a C++ project in eclipse now compiles my code. |
|
| Back to top |
|
 |
cheriff Regular
Joined: 23 Jun 2004 Posts: 262 Location: Sydney.au
|
Posted: Thu Sep 11, 2008 4:24 pm Post subject: |
|
|
Is your file named main.c? It looks like you're using psp-gcc to compile, not psp-g++. And since that isn't C code in there, might be confusing the compiler?
I guess .cc or .cpp or something will invoke the g++ rules in the Makefiles ...
EDIT: beaten to it :) _________________ Damn, I need a decent signature! |
|
| Back to top |
|
 |
|