M
Mark
I'm trying to write an RAS class on windows ad RasDial's callback
function requires it to either not be a class member or for it to be
static. I went for the static option so in the header file I declared an
extern variable for the class outside of the class definition so I
could use it in the static function, like so:
#ifndef RasClientH
#define RasClientH
#include <ras.h>
#include <raserror.h>
class RasClient
{
[snip]
};
extern RasClient ras;
#endif
then in the header file for the class I will be using ras in I put:
#ifndef MainFormH
#define MainFormH
#include "RasClient.h"
[snip]
class TfrmMain : public TForm
{
[snip]
private: // User declarations
RasClient ras;
[snip]
};
#endif
but when it's linking I'm getting an error saying '[Linker Error]
Unresolved external '_ras' referenced from RASCLIENT.OBJ'. Can anyone
tell me what I'm doing wrong?
TIA
function requires it to either not be a class member or for it to be
static. I went for the static option so in the header file I declared an
extern variable for the class outside of the class definition so I
could use it in the static function, like so:
#ifndef RasClientH
#define RasClientH
#include <ras.h>
#include <raserror.h>
class RasClient
{
[snip]
};
extern RasClient ras;
#endif
then in the header file for the class I will be using ras in I put:
#ifndef MainFormH
#define MainFormH
#include "RasClient.h"
[snip]
class TfrmMain : public TForm
{
[snip]
private: // User declarations
RasClient ras;
[snip]
};
#endif
but when it's linking I'm getting an error saying '[Linker Error]
Unresolved external '_ras' referenced from RASCLIENT.OBJ'. Can anyone
tell me what I'm doing wrong?
TIA