D
Dariusz Plygawko
Welcome,
When I'am trying to call static function(setAreaLoader) from other class, I
get following linker-error. How to solve it? I'm slowly getting crazy... And
I have the same problem with the rest of static members... Help me!
[Linker Error] Unresolved external 'Area::m_loader' referenced from
C:\DAREK\NAVIGATOR\AREA.OBJ
***Area.h:***
#ifndef area_H
#define area_H
#include <vcl.h>
#include "Map.h"
#include "AreaLoader.h"
class Area
{
private:
Map * m_maps;
int m_mapsNumber;
public:
Area();
~Area();
static void setAreaLoader(AreaLoader * p_loader);
static Area * createAreaWithLoader(AnsiString p_areaId);
static AreaLoader * m_loader;
};
#endif
***area.cpp:***
#include "Area.h"
....
void Area::setAreaLoader(AreaLoader * p_loader)
{
m_loader = p_loader;
}
....
Best Regards,
Dariusz
When I'am trying to call static function(setAreaLoader) from other class, I
get following linker-error. How to solve it? I'm slowly getting crazy... And
I have the same problem with the rest of static members... Help me!
[Linker Error] Unresolved external 'Area::m_loader' referenced from
C:\DAREK\NAVIGATOR\AREA.OBJ
***Area.h:***
#ifndef area_H
#define area_H
#include <vcl.h>
#include "Map.h"
#include "AreaLoader.h"
class Area
{
private:
Map * m_maps;
int m_mapsNumber;
public:
Area();
~Area();
static void setAreaLoader(AreaLoader * p_loader);
static Area * createAreaWithLoader(AnsiString p_areaId);
static AreaLoader * m_loader;
};
#endif
***area.cpp:***
#include "Area.h"
....
void Area::setAreaLoader(AreaLoader * p_loader)
{
m_loader = p_loader;
}
....
Best Regards,
Dariusz