Archived Forum Post

Index of archived forum posts

Question:

Linker error with CkFtp2W

Sep 26 '12 at 03:30

I have updated my code to use CkFtp2W everywhere and adjusted as required.

I have now done a full rebuild in Visual Studio 2005 and link link errors.

What have I done wrong? :(

4>Linking...
4>BrowseFolderFTP.obj : error LNK2019: unresolved external symbol "public: bool __thiscall CkFtp2W::ChangeRemoteDir(wchar_t const *)" (?ChangeRemoteDir@CkFtp2W@@QAE_NPB_W@Z) referenced in function "public: virtual int __thiscall CBrowseFolderFTP::OnInitDialog(void)" (?OnInitDialog@CBrowseFolderFTP@@UAEHXZ)
4>MainFrm.obj : error LNK2001: unresolved external symbol "public: bool __thiscall CkFtp2W::ChangeRemoteDir(wchar_t const *)" (?ChangeRemoteDir@CkFtp2W@@QAE_NPB_W@Z)
4>BrowseFolderFTP.obj : error LNK2019: unresolved external symbol "public: bool __thiscall CkFtp2W::GetFilename(long,class CkString &)" (?GetFilename@CkFtp2W@@QAE_NJAAVCkString@@@Z) referenced in function "private: void __thiscall CBrowseFolderFTP::ReadFolder(class ATL::CStringT<wchar_t,class strtraitmfc<wchar_t,class="" atl::chtraitscrt<wchar_t=""> > >,struct _TREEITEM *)" (?ReadFolder@CBrowseFolderFTP@@AAEXV?$CStringT@_WV?$StrTraitMFC@_WV?$ChTraitsCRT@_W@ATL@@@@@ATL@@PAU_TREEITEM@@@Z)
4>BrowseFolderFTP.obj : error LNK2019: unresolved external symbol "public: bool __thiscall CkFtp2W::GetIsDirectory(long)" (?GetIsDirectory@CkFtp2W@@QAE_NJ@Z) referenced in function "private: void __thiscall CBrowseFolderFTP::ReadFolder(class ATL::CStringT<wchar_t,class strtraitmfc<wchar_t,class="" atl::chtraitscrt<wchar_t=""> > >,struct _TREEITEM *)" (?ReadFolder@CBrowseFolderFTP@@AAEXV?$CStringT@_WV?$StrTraitMFC@_WV?$ChTraitsCRT@_W@ATL@@@@@ATL@@PAU_TREEITEM@@@Z)
4>BrowseFolderFTP.obj : error LNK2019: unresolved external symbol "public: wchar_t const * __thiscall CkFtp2W::lastErrorText(void)" (?lastErrorText@CkFtp2W@@QAEPB_WXZ) referenced in function "private: void __thiscall CBrowseFolderFTP::ReadFolder(class ATL::CStringT<wchar_t,class strtraitmfc<wchar_t,class="" atl::chtraitscrt<wchar_t=""> > >,struct _TREEITEM *)" (?ReadFolder@CBrowseFolderFTP@@AAEXV?$CStringT@_WV?$StrTraitMFC@_WV?$ChTraitsCRT@_W@ATL@@@@@ATL@@PAU_TREEITEM@@@Z)
4>CommunityTalks.obj : error LNK2001: unresolved external symbol "public: wchar_t const * __thiscall CkFtp2W::lastErrorText(void)" (?lastErrorText@CkFtp2W@@QAEPB_WXZ)
4>MainFrm.obj : error LNK2001: unresolved external symbol "public: wchar_t const * __thiscall CkFtp2W::lastErrorText(void)" (?lastErrorText@CkFtp2W@@QAEPB_WXZ)
4>BrowseFolderFTP.obj : error LNK2019: unresolved external symbol "public: long __thiscall CkFtp2W::get_NumFilesAndDirs(void)" (?get_NumFilesAndDirs@CkFtp2W@@QAEJXZ) referenced in function "private: void __thiscall CBrowseFolderFTP::ReadFolder(class ATL::CStringT<wchar_t,class strtraitmfc<wchar_t,class="" atl::chtraitscrt<wchar_t=""> > >,struct _TREEITEM *)" (?ReadFolder@CBrowseFolderFTP@@AAEXV?$CStringT@_WV?$StrTraitMFC@_WV?$ChTraitsCRT@_W@ATL@@@@@ATL@@PAU_TREEITEM@@@Z)
4>BrowseFolderFTP.obj : error LNK2019: unresolved external symbol "public: bool __thiscall CkFtp2W::get_IsConnected(void)" (?get_IsConnected@CkFtp2W@@QAE_NXZ) referenced in function "private: void __thiscall CBrowseFolderFTP::ReadFolder(class ATL::CStringT<wchar_t,class strtraitmfc<wchar_t,class="" atl::chtraitscrt<wchar_t=""> > >,struct _TREEITEM *)" (?ReadFolder@CBrowseFolderFTP@@AAEXV?$CStringT@_WV?$StrTraitMFC@_WV?$ChTraitsCRT@_W@ATL@@@@@ATL@@PAU_TREEITEM@@@Z)
4>CommunityTalks.obj : error LNK2019: unresolved external symbol "public: bool __thiscall CkFtp2W::Connect(void)" (?Connect@CkFtp2W@@QAE_NXZ) referenced in function "public: static bool __cdecl CCommunityTalksApp::ConnectToFTP(class CkFtp2W &,class ATL::CStringT<wchar_t,class strtraitmfc<wchar_t,class="" atl::chtraitscrt<wchar_t=""> > >,class ATL::CStringT<wchar_t,class strtraitmfc<wchar_t,class="" atl::chtraitscrt<wchar_t=""> > >,class ATL::CStringT<wchar_t,class strtraitmfc<wchar_t,class="" atl::chtraitscrt<wchar_t=""> > >,class ATL::CStringT<wchar_t,class strtraitmfc<wchar_t,class="" atl::chtraitscrt<wchar_t=""> > > &)" (?ConnectToFTP@CCommunityTalksApp@@SA_NAAVCkFtp2W@@V?$CStringT@_WV?$StrTraitMFC@_WV?$ChTraitsCRT@_W@ATL@@@@@ATL@@11AAV34@@Z)
4>CommunityTalks.obj : error LNK2019: unresolved external symbol "public: void __thiscall CkFtp2W::put_Password(wchar_t const *)" (?put_Password@CkFtp2W@@QAEXPB_W@Z) referenced in function "public: static bool __cdecl CCommunityTalksApp::ConnectToFTP(class CkFtp2W &,class ATL::CStringT<wchar_t,class strtraitmfc<wchar_t,class="" atl::chtraitscrt<wchar_t=""> > >,class ATL::CStringT<wchar_t,class strtraitmfc<wchar_t,class="" atl::chtraitscrt<wchar_t=""> > >,class ATL::CStringT<wchar_t,class strtraitmfc<wchar_t,class="" atl::chtraitscrt<wchar_t=""> > >,class ATL::CStringT<wchar_t,class strtraitmfc<wchar_t,class="" atl::chtraitscrt<wchar_t=""> > > &)" (?ConnectToFTP@CCommunityTalksApp@@SA_NAAVCkFtp2W@@V?$CStringT@_WV?$StrTraitMFC@_WV?$ChTraitsCRT@_W@ATL@@@@@ATL@@11AAV34@@Z)
4>CommunityTalks.obj : error LNK2019: unresolved external symbol "public: void __thiscall CkFtp2W::put_Username(wchar_t const *)" (?put_Username@CkFtp2W@@QAEXPB_W@Z) referenced in function "public: static bool __cdecl CCommunityTalksApp::ConnectToFTP(class CkFtp2W &,class ATL::CStringT<wchar_t,class strtraitmfc<wchar_t,class="" atl::chtraitscrt<wchar_t=""> > >,class ATL::CStringT<wchar_t,class strtraitmfc<wchar_t,class="" atl::chtraitscrt<wchar_t=""> > >,class ATL::CStringT<wchar_t,class strtraitmfc<wchar_t,class="" atl::chtraitscrt<wchar_t=""> > >,class ATL::CStringT<wchar_t,class strtraitmfc<wchar_t,class="" atl::chtraitscrt<wchar_t=""> > > &)" (?ConnectToFTP@CCommunityTalksApp@@SA_NAAVCkFtp2W@@V?$CStringT@_WV?$StrTraitMFC@_WV?$ChTraitsCRT@_W@ATL@@@@@ATL@@11AAV34@@Z)
4>CommunityTalks.obj : error LNK2019: unresolved external symbol "public: void __thiscall CkFtp2W::put_Hostname(wchar_t const *)" (?put_Hostname@CkFtp2W@@QAEXPB_W@Z) referenced in function "public: static bool __cdecl CCommunityTalksApp::ConnectToFTP(class CkFtp2W &,class ATL::CStringT<wchar_t,class strtraitmfc<wchar_t,class="" atl::chtraitscrt<wchar_t=""> > >,class ATL::CStringT<wchar_t,class strtraitmfc<wchar_t,class="" atl::chtraitscrt<wchar_t=""> > >,class ATL::CStringT<wchar_t,class strtraitmfc<wchar_t,class="" atl::chtraitscrt<wchar_t=""> > >,class ATL::CStringT<wchar_t,class strtraitmfc<wchar_t,class="" atl::chtraitscrt<wchar_t=""> > > &)" (?ConnectToFTP@CCommunityTalksApp@@SA_NAAVCkFtp2W@@V?$CStringT@_WV?$StrTraitMFC@_WV?$ChTraitsCRT@_W@ATL@@@@@ATL@@11AAV34@@Z)
4>CommunityTalks.obj : error LNK2019: unresolved external symbol "public: bool __thiscall CkFtp2W::UnlockComponent(wchar_t const *)" (?UnlockComponent@CkFtp2W@@QAE_NPB_W@Z) referenced in function "public: static bool __cdecl CCommunityTalksApp::ConnectToFTP(class CkFtp2W &,class ATL::CStringT<wchar_t,class strtraitmfc<wchar_t,class="" atl::chtraitscrt<wchar_t=""> > >,class ATL::CStringT<wchar_t,class strtraitmfc<wchar_t,class="" atl::chtraitscrt<wchar_t=""> > >,class ATL::CStringT<wchar_t,class strtraitmfc<wchar_t,class="" atl::chtraitscrt<wchar_t=""> > >,class ATL::CStringT<wchar_t,class strtraitmfc<wchar_t,class="" atl::chtraitscrt<wchar_t=""> > > &)" (?ConnectToFTP@CCommunityTalksApp@@SA_NAAVCkFtp2W@@V?$CStringT@_WV?$StrTraitMFC@_WV?$ChTraitsCRT@_W@ATL@@@@@ATL@@11AAV34@@Z)
4>MainFrm.obj : error LNK2019: unresolved external symbol "public: bool __thiscall CkFtp2W::PutFile(wchar_t const *,wchar_t const *)" (?PutFile@CkFtp2W@@QAE_NPB_W0@Z) referenced in function "private: void __thiscall CMainFrame::CreateTransferZipAndBackup(void)" (?CreateTransferZipAndBackup@CMainFrame@@AAEXXZ)
4>MainFrm.obj : error LNK2019: unresolved external symbol "public: void __thiscall CkFtp2W::put_EventCallbackObject(class CkFtpProgress *)" (?put_EventCallbackObject@CkFtp2W@@QAEXPAVCkFtpProgress@@@Z) referenced in function "private: void __thiscall CMainFrame::CreateTransferZipAndBackup(void)" (?CreateTransferZipAndBackup@CMainFrame@@AAEXXZ)
4>OptionsBackupPage.obj : error LNK2019: unresolved external symbol "public: bool __thiscall CkFtp2W::Disconnect(void)" (?Disconnect@CkFtp2W@@QAE_NXZ) referenced in function "public: void __thiscall COptionsBackupPage::OnBnClickedButtonTestConnection(void)" (?OnBnClickedButtonTestConnection@COptionsBackupPage@@QAEXXZ)
4>.\.\Release\CommunityTalks.exe : fatal error LNK1120: 14 unresolved externals

Accepted Answer

These new builds should fix the linking problem:

32-bit: http://www.chilkatsoft.com/preRelease/chilkat-9.3.2-x86-vc8.zip

64-bit: http://www.chilkatsoft.com/preRelease/chilkat-9.3.2-x86_64-vc8.zip