Click here to Skip to main content
15,881,709 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
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

C++
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
Posted
Comments
Eugen Podsypalnikov 30-Nov-12 8:51am    
Are the (FIServerDlg.cpp and FILicenseSettings.cpp) files in the same project ? :)
Tarun Batra 30-Nov-12 8:52am    
yes sir
Eugen Podsypalnikov 30-Nov-12 8:55am    
...and how it (the function) is declared in its header ? :)
Tarun Batra 30-Nov-12 8:59am    
It is declared as CString GetCodeStartup1(); in FILicenseSettings.h
Eugen Podsypalnikov 30-Nov-12 9:01am    
Has the pragma (set it):
#pragma error
any compiling effect inside the function's body ? :)

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900