A
Allan Bruce
Hi there,
I get a linker error with the following, can somebody tell me how to remedy
it? the error is:
--------------------Configuration: WinGalaga - Win32
Release--------------------
Linking...
Weapon.obj : error LNK2001: unresolved external symbol "protected: static
int Weapon::mCurrLight" (?mCurrLight@Weapon@@1HA)
WeaponManager.obj : error LNK2001: unresolved external symbol "protected:
static int Weapon::mCurrLight" (?mCurrLight@Weapon@@1HA)
Release/WinGalaga.exe : fatal error LNK1120: 1 unresolved externals
Error executing link.exe.
WinGalaga.exe - 3 error(s), 0 warning(s)
I am trying to initialise the lights from the WeaponManager by:
Weapon::InitLights();
Here is the header of the file where the problem exists
class Weapon : public GameEntity
{
friend class WeaponManager;
public:
Weapon(void);
virtual ~Weapon(void);
virtual void Draw(void);
void DrawLight(void);
static void InitLights(void){mCurrLight = GL_LIGHT1;}
...
protected:
...
// light stuff
static int mCurrLight;
};
Thanks
Allan
I get a linker error with the following, can somebody tell me how to remedy
it? the error is:
--------------------Configuration: WinGalaga - Win32
Release--------------------
Linking...
Weapon.obj : error LNK2001: unresolved external symbol "protected: static
int Weapon::mCurrLight" (?mCurrLight@Weapon@@1HA)
WeaponManager.obj : error LNK2001: unresolved external symbol "protected:
static int Weapon::mCurrLight" (?mCurrLight@Weapon@@1HA)
Release/WinGalaga.exe : fatal error LNK1120: 1 unresolved externals
Error executing link.exe.
WinGalaga.exe - 3 error(s), 0 warning(s)
I am trying to initialise the lights from the WeaponManager by:
Weapon::InitLights();
Here is the header of the file where the problem exists
class Weapon : public GameEntity
{
friend class WeaponManager;
public:
Weapon(void);
virtual ~Weapon(void);
virtual void Draw(void);
void DrawLight(void);
static void InitLights(void){mCurrLight = GL_LIGHT1;}
...
protected:
...
// light stuff
static int mCurrLight;
};
Thanks
Allan