Linker Error in MFC App ported to VC++ 2005

When I try to build an MFC project that has been ported to the VC++ 2005 compiler I get the following linker error:

ProgramName error LNK2019: unresolved external symbol __imp__FtpCommandA@24 referenced in function "public: class CInternetFile * __thiscall CFtpConnection::Command(char const *,enum CFtpConnection::CmdResponseType,unsigned long,unsigned long)" ( Command@CFtpConnection@@QAEPAVCInternetFile@@PBDW4CmdResponseType@1@KK@Z)





Answer this question

Linker Error in MFC App ported to VC++ 2005

  • dr266

    Oh hell. Somehow the library file needed to use afxinet classes was missed when porting the project. I put in the reference and it works fine now.

    Thanks anyway.

  • Inna73863

    Could you please a small sample reproducing the issue so that the folks on the fourms can take a look

    Thanks,
      Ayman Shoukry
      VC++ Team

  • Bas Pronk

    Hi Seth,
      Do you have a stand alone complete sample where the issue can be reproduced

    Thanks,
      Ayman Shoukry
      VC++ Team

  • Koiti

    Hi Seth! > When I try to build an MFC project that has been ported to the VC++ 2005 > compiler I get the following linker error: > > ProgramName error LNK2019: unresolved external symbol > __imp__FtpCommandA@24 referenced in > function "public: class CInternetFile * __thiscall > CFtpConnection::Command(char const *,enum > CFtpConnection::CmdResponseType,unsigned long,unsigned long)" > ( Command@CFtpConnection@@QAEPAVCInternetFile@@PBDW4CmdResponseType@1@KK@Z > ) Are you trying to target NT4, or do you have an old PSDK -- Greetings Jochen My blog about Win32 and .NET http://blog.kalmbachnet.de/
  • TheAgent

    Nope, I am targeting Windows XP, 2000, and 9x, I am using MFC version 6.something.
  • Room222

    I am using the following MFC library:

    #include <afxinet.h>

    I suspect this method to be the one which is causing the error:

    bool CApplicationProcessor::PerformAuthentication(LPCTSTR lpszUsername, LPCTSTR lpszPassword)
    {
     
    bool bRetval = false;
      CString strCookie;
      CInternetSession* ApplicationServer =
    new CInternetSession();
      InfuzerServer->GetCookie(www.ApplicationURL.comlogin.jsp ,"CookieName",  
                                          strCookie);
     
    return bRetval;

    }


  • learningWPF

    No I don't have a standalone component for you. This is part of a large client application...actually, let me see if I can cook one up for you. Thanks for the attention.

    BTW, you guys did a great job on the memory leak detection :)


  • Linker Error in MFC App ported to VC++ 2005