here's the basic setup:

#ifndef _GLOBALS
#define _GLOBALS
#include <list>
#include <vector>
#include "unit.h"

extern	std::vector	<unit>         reserved_units;
extern	std::list       <unit*>	   active;
extern	std::vector     <unit>	    generics;
#endif
//globals.cpp
#include "globals.h"
#include "unit.h"
#include <vector>
#include <list>

vector		<unit>		generics(15);
vector		<unit>		reserved_units(200);
list		   <unit*>	       active(0);

unit.h has a functioning unit class that I haven't changed recently. After adding a new, unrelated .h and .cpp file and compiling I receive: 'unit" : undeclared identifier errors, a syntax error '>' for extern std::list <unit*> active;

and then what is more concerning is about 50 errors from
C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\include\xdebug
citing various things from missing ;, undeclared identifiers such as 'writableBytes', attribute not allowed on 'abstract declarator', and various other syntax errors that point to the xdebug file.

Another 50 errors like these crop up, but these come from
C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\include\ctype.h.

In all likelihood, there is something I screwed up elsewhere. But I can't ask someone else to just debug my entire project and the compile errors are pointing to here. Could anyone please give me a hint towards things I should be looking for elsewhere in the code, or if there is something wrong here?? Or maybe why I'm getting syntax errors in code I didn't write?

-Thanks

Solved.
A forward class declaration in globals.h fixed the problem.

Although I'm still not sure why I got all the xdebug and ctype.h errors seemingly unrelated.

Also not sure why this didn't show up before. Must've deleted forward declaration on accident.

This question has already been answered. Start a new discussion instead.