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 ={
0x0d,0x04,0x0a,0x00,0x9e,0x28,0x31,0x30,0x33,0x39,0x29,0x00,0x00,0x00,0xa2,0xda,
0xa9,0x14,0x85,0x01,0xa9,0x80,0x85,0x03,0xa0,0x00,0x86,0x00,0x84,0x02,0xa2,0x04,
0xb1,0x00,0x91,0x02,0xc8,0xd0,0xf9,0xe6,0x01,0xe6,0x03,0xca,0xd0,0xf2,0x20,0xe4,
0xff,0xd0,0xfb,0x20,0xe4,0xff,0xf0,0xfb,0xa9,0x93,0x20,0xd2,0xff,0x4c,0xbd,0x14,

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.
Thanks!
Kevin

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.

Troy