login about faq

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

asked Sep 25 '12 at 07:19

Andrew's gravatar image

Andrew
95611

I know my library file is correct ChilkatRel.lib and ChilkatDgb.lib.

This happens for both 32 bit builds and both 64 bit builds, using the 64 bit libraries.

(Sep 25 '12 at 08:08) Andrew

Thanks Andrew, I'm having a look...

(Sep 25 '12 at 11:43) chilkat ♦♦

link

answered Sep 25 '12 at 13:05

chilkat's gravatar image

chilkat ♦♦
11.8k316358421

Thank you. I will download and test! :)

(Sep 25 '12 at 13:36) Andrew

Thank you. Release builds compile fine now so I expect debug will too.

One question about compiling the 64 bit library:

4>ChilkatRel_x64.lib(CkFtp2W.obj) : MSIL .netmodule or module compiled with /GL found; restarting link with /LTCG; add /LTCG to the link command line to improve linker performance
4>LINK : warning LNK4075: ignoring '/INCREMENTAL' due to '/LTCG' specification
(Sep 25 '12 at 15:09) Andrew

When I switch on the /LTCG flag and do a full rebuild it then fails:

4>LINK : warning LNK4075: ignoring '/INCREMENTAL' due to '/LTCG' specification
4>fatal error C1047: The object or library file 'D:\My Libraries\ChilkatVC8-9-3-2_x64\libs\ChilkatRel_x64.lib' was created with an older compiler than other objects; rebuild old objects and libraries
4>LINK : fatal error LNK1257: code generation failed

At the moment I leave the switch off.

(Sep 25 '12 at 15:20) Andrew

Hello again !

May I ask why the 64 bit build has a different optimization setting than the 32 bit build (or appears to)? I do not get the LTCG warning when building 32 bit.

Thanks.

Andrew

(Sep 26 '12 at 03:30) Andrew
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or __italic__
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Tags:

×3
×2

Asked: Sep 25 '12 at 07:19

Seen: 1,395 times

Last updated: Sep 26 '12 at 03:30

powered by OSQA