Error message doesn't make any sense and conditional assembly not working.

I’m using the latest IDE (0022) downloaded and installed today on a Win7/64 machine.
I’m compiling the code below and getting the following error message:

petduino:15: error: expected ‘,’ or ‘…’ before ‘’ token
petduino:15: error: ISO C++ forbids declaration of ‘M6502’ with no type
petduino:16: error: expected ‘,’ or ‘…’ before '
’ token
petduino:16: error: ISO C++ forbids declaration of ‘M6502’ with no type

First off, the source file “\source\pet\space.cpp”, which is included on line 15 just contains one large array of unsigned characters ( and it compiles fine using vs2008 ). So I have no idea what this error is referring to. Second the struct M6502 which it seems to be complaining about is in a different source file and also compiles fine with VS2008. My programs runs with two different 6502 emulators and after getting the error above I tried switching the defines to include the alternate emulator and I still get the same error which again makes no sense since the other emulator doesn’t even have a M6502 struct and actually compiled fine earlier but crashed because it uses too much ram. All of the #included code in the external c++ files compiles and runs fine using VS2008.

The next line down is line 1 of the petduino file
Original Space Invaders on the Commodore PET running via a 6502 Emulator
Screen output to be handled with a Gameduino as soon as it arrives.

#include <WProgram.h>
#include <avr/pgmspace.h>

#define USEM6502 1
#define USES6502 0

#define KEYBUFFER 0x0270
#define KEYPRESS 0x0097

#include “\source\pet\space.cpp”

#define APPSTART 0x0401
#define APPEND (APPSTART+sizeof(xoutput))
#define APPEXEC 0x040f

unsigned char gRam[512];
unsigned char gTiles[1024];

This is the first few lines of space.cpp

unsigned char xoutput PROGMEM ={

Just in case it might be a source for problems my files layout is:

/source/pet ← external source and header files are here
/source/pet/petduino <-petduino.pde file is here

I can post more code if necessary.

After a bunch of messing around I finally got it to work.

My application was called petduino and the file is called petduino.pde. So what finally worked is to make a 2nd file called petduino.cpp, copy all of the code from petduino.pde into it, clear petduino.pde so it has nothing in it. Then when I compile it works and my app runs.

Thanks for posting, I am waiting on a gameduino also. I do not have the programming experience yet so it is helpful to see what others are doing.