0

i am getting the following error

error LNK2019: unresolved external symbol "public: class ATL::CStringT > > __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 E:\TIMSWebServerManager_lic\TIMSWebServerManager\TIMSWebServerManager.obj TIMSWebServerManager

My function defination is as follows:

CString CFILicenseSettings::GetCodeStartup1()
{
CString a = "why";
return a;
} 

the declaration of the function is as follows:-

CString     GetCodeStartup1();

When i searched the web for the above error i found that this error is because my class is derived from CString class,but this is not the case..... I get this error when i call the function GetCodeStartup1(); if i comment the calling of function GetCodeStartup1(); my program compile successfully

How can i remove the error?

Thanks in advance

Dany
  • 2,034
  • 8
  • 34
  • 54
  • This error is not because the compiler thinks your class is derived from `CString`. Are you sure the file that contains the definition of `CFILicenseSettings::GetCodeStartup1()` is actually being compiled (maybe introduce an intentional syntax error to verify you're editing the file that's being compiled)? Did you try performing a clean then a rebuild? – Michael Burr Dec 03 '12 at 08:58
  • @MichaelBurr Ya sir i try'ed everything possible – Dany Dec 03 '12 at 09:41
  • What output do you get if you run `dumpbin /symbols filename.obj | find "GetCodeStartup1"` on the object file that `CString CFILicenseSettings::GetCodeStartup1()` is supposed to be in? (please edit the output into the question, as it'll likely be too ugly for a comment). – Michael Burr Dec 03 '12 at 09:45

0 Answers0