问题描述
我正在此错误: -
错误LNK2019:解析外部符号公共:类ATL :: CStringT<炭,类StrTraitMFC_DLL<炭,类ATL :: ChTraitsCRT<炭>>>?????__thiscall CFILicenseSettings :: GetCodeStartup1(无效)(GetCodeStartup1 @ CFILicenseSettings @@ QAE AV $ CStringT @ DV $ StrTraitMFC_DLL @ DV $ ChTraitsCRT @ d @ ATL @@@@ @ @@ ATL XZ)在功能__catch $?ValidateLicense @ @@ CFIServerDlg $ AAE_NXZ 0
$ b $引用b中的功能是定义如下
CString的CFILicenseSettings :: GetCodeStartup1()
{
BYTE * BCODE = new BYTE [ 28 ];
int * pnSize = new int ( 28 );
GetCodeIn1(bCode,pnSize);
int y;
RC4_Init(m_byX,strlen(( char *)m_byX));
for (y = 0 ; y< * pnSize; y ++)
{
m_MainLFString [y] = bCode [y] ^ RC4_Output();
}
m_MainLFString [y] = ' \0';
// 跨度> strcpy的(m_szMainLFString.GetBuffer(m_szMainLFString.GetLength()),m_MainLFString);
m_szMainLFString = m_MainLFString;
delete [] bCode;
delete pnSize;
return m_szMainLFString;
}
要使用CString,我还在项目中添加了头文件atlstr.h文件
能否请你帮我消除这种误差
I am getting this error :-
error LNK2019: unresolved external symbol "public: class ATL::CStringT<char,class StrTraitMFC_DLL<char,class ATL::ChTraitsCRT<char> > > __thiscall CFILicenseSettings::GetCodeStartup1(void)" (?GetCodeStartup1@CFILicenseSettings@@QAE?AV?$CStringT@DV?$StrTraitMFC_DLL@DV?$ChTraitsCRT@D@ATL@@@@@ATL@@XZ) referenced in function __catch$?ValidateLicense@CFIServerDlg@@AAE_NXZ$0
The function is defines as follows
CString CFILicenseSettings::GetCodeStartup1() { BYTE* bCode = new BYTE[28]; int * pnSize = new int(28); GetCodeIn1 (bCode, pnSize ); int y; RC4_Init(m_byX, strlen((char*)m_byX)); for (y = 0; y < *pnSize ; y++) { m_MainLFString[y] = bCode[y] ^ RC4_Output(); } m_MainLFString[y] = '\0'; //strcpy(m_szMainLFString.GetBuffer(m_szMainLFString.GetLength()),m_MainLFString); m_szMainLFString = m_MainLFString; delete [] bCode; delete pnSize; return m_szMainLFString; }
To use CString i have also added header file atlstr.h file in my project too
Can you please help me to remove this error
这篇关于我为什么会收到错误LNK2019的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!