S
sam
Hi,
I've written the following static class definition :
#ifndef __AUTH__
#define __AUTH__
#include <iostream>
#include <string>
#include <fstream>
#include "fileutils.hh"
using namespace std;
class Auth
{
public:
Auth();
void reload_licence(ifstream &conf);
void save();
static bool validate() {return false;};
~Auth() {};
private:
static string _seed;
static string key;
static string period;
};
string Auth::_seed = "sakjfskjfsk342989sj_+)_()*";
#endif
but the linking is failed with the following error:
auth.o(.bss+0x0): multiple definition of `Auth::_seed'
auth.o(.bss+0x4): multiple definition of `Auth::key'
auth.o(.bss+0x8): multiple definition of `Auth:eriod'
How can I fix this error?
Thanks
Sam
I've written the following static class definition :
#ifndef __AUTH__
#define __AUTH__
#include <iostream>
#include <string>
#include <fstream>
#include "fileutils.hh"
using namespace std;
class Auth
{
public:
Auth();
void reload_licence(ifstream &conf);
void save();
static bool validate() {return false;};
~Auth() {};
private:
static string _seed;
static string key;
static string period;
};
string Auth::_seed = "sakjfskjfsk342989sj_+)_()*";
#endif
but the linking is failed with the following error:
auth.o(.bss+0x0): multiple definition of `Auth::_seed'
auth.o(.bss+0x4): multiple definition of `Auth::key'
auth.o(.bss+0x8): multiple definition of `Auth:eriod'
How can I fix this error?
Thanks
Sam