Even with include guards I get the errors.
Let's say my main.h looks like this:
Code:
#include <windows.h>
#include <stdio.h>
#include <vector>
using std::vector;
//Define macros here
#define PI 3.141592654
//End Define macros
//Globals here
#ifdef MAIN_CPP
#define DECLARE
#else
#define DECLARE extern
#endif
DECLARE int globalVariable;
DECLARE char globalString;
//End Globals
//All function prototyes
int WINAPI WinMain(...);
LRESULT CALLBACK WndProc(...);
int function();
void function_2();
//End Function Prototypes
Now, in main.cpp, i'll have something like this:
Code:
#define MAIN_CPP
#include "main.h"
int WINAPI WinMain(...)
{
}
LRESULT CALLBACK WndProc(...)
{
}
Then I have about six other .cpp files which include main.h
One other thing:
If project A was originally built with VS 6, and project B is originally built with VS .NET, would there be any difference between the two projects if the VS 6 project was converted to a VS .NET project?