Home > Software engineering >  Cannot resolve the problem of external symbol
Cannot resolve the problem of external symbol

Time:02-20

QQTangClient. HPP:
 namespace QQTangCheatEngine 
{
The class CQQTangClient
{
.
};
CQQTangClient g_QQTangClient;
}


QQTCheatEngine. HPP:
 # include "CCall. HPP 
"The namespace QQTangCheatEngine
{class CQQTangCheatEngine
{
Private:
CCall m_call;
Public:
Void CreateRoom ()
{
M_call. CreateRoom ();
}
};
}


CCall. HPP:
 namespace QQTangCheatEngine 
{
The class CCall
{
Private:

Public:
Void CreateRoom ()
{
Typedef void (__cdecl * pCreateRoom) ();
PCreateRoom (g_QQTangClient m_CreateRoom) ();
}
};
}


WANDERER. CPP defined in
 # include "QQTangCheatEngine. HPP 
"Using the namespace QQTangCheatEngine;
Extern QQTangCheatEngine: : CQQTangClient g_QQTangClient;
CQQTangCheatEngine Engine;


Wanderer. CPP is a project
QQTangClient HPP, QQTCheatEngine HPP, CCall HPP is another project


Error: 1 & gt; WANDERER. Obj: error LNK2001: cannot resolve the external symbol of "class QQTangCheatEngine: : CQQTangClient QQTangCheatEngine: : g_QQTangClient" (? 3 vcqqtangclient g_QQTangClient @ QQTangCheatEngine @ @ @ @ 1 A)

CodePudding user response:

Whether the Lib didn't import

CodePudding user response:

What lib...

CodePudding user response:

Variables are not in the header file
//QQTangClient HPP 
The namespace QQTangCheatEngine
{
The class CQQTangClient
{
.
};
//CQQTangClient g_QQTangClient;
}

//WANDERER. CPP
# include "QQTangCheatEngine. HPP
"Using the namespace QQTangCheatEngine;
CQQTangClient g_QQTangClient;
CQQTangCheatEngine Engine;



  • Related