Whenever I include this file more then once:


#ifdef _WIN32
#pragma once

#include "DarkGDK.h"

// For getting the next unused ID
int GetNextID( )
	int temp = 1;
	while( dbObjectExist( temp ) ) // Found an id == temp?
	return temp;

#endif // GFUNC_GAURD

I get this error even though I've got include gaurds:

------ Build started: Project: Dark GDK - Test Game, Configuration: Debug Win32 ------
Generating Code...
cbEntity.obj : error LNK2005: "int __cdecl GetNextID(void)" (?GetNextID@@YAHXZ) already defined in Main.obj
Debug\Dark GDK - Test Game.exe : fatal error LNK1169: one or more multiply defined symbols found
Build log was saved at "file://c:\Documents and Settings\tom\My Documents\Visual Studio 2008\Projects\Project1\Project1\Dark GDK - Test Game\Dark GDK - Test Game\Debug\BuildLog.htm"
Dark GDK - Test Game - 2 error(s), 0 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

Any help would be appreciated

Source code goes in .cpp files, not .h files!

Two files include that .h file, and you have TWO copies of the same function name.
This is what "multiply defined" means - more than ONE.