I am having a problem with my program where in I declared the variable from a header file and execute it on a CPP file. I am getting an error which is the undefined reference to the variable.
here a sample code of my project:
CPP FILE
#include "function.h"
CClass::CClass() : m_Db(HOST,USER,PASSWORD,DATABASE)
{
...
}
HEADER FILE
#ifndef CONNECTION_H
#define CONNECTION_H
#include "crypt.h"
extern CCrypt *c_crypting;
#define HOST c_crypting->Decrypt_Host()
#define USER c_crypting->Decrypt_Username()
#define PASSWORD c_crypting->Decrypt_Password()
#define DATABASE c_crypting->Decrypt_Database()
#endif // DBCONNECTION_H
if i run this code I get an error of "undefined reference to 'c_crypting'"