More dll trouble -- when I include this header in multiple source files I get LINK2005 errors
all are along these lines
error LNK2005: "struct IDirect3D9 * g_pD3D" (?g_pD3D@@3PAUIDirect3D9@@A) already defined in Audio.obj
Code:
#ifndef REAL_EARTH_ENGINE_H
#define REAL_EARTH_ENGINE_H
#include <d3d9.h>
#define DIRECTINPUT_VERSION 0x0800
#include <dinput.h>
#include <dsound.h>
#include <string>
using std::string;
#define DECLSPEC __declspec( dllexport )
//Global Functions
DECLSPEC bool RE_Init(bool windowed);
DECLSPEC string RE_GetLastError(void);
//Global Variables
DECLSPEC LPDIRECT3D9 g_pD3D;
DECLSPEC LPDIRECT3DDEVICE9 g_pd3dDevice;
DECLSPEC HWND hWnd;
//Private Functions
//Private Variables
string error;
#endif
Thanks for any help,
MadCow