1>nafxcw.lib(inet.obj) : error LNK2001: 无法解析的外部符号 __imp__InternetCrackUrlA@16
1>nafxcw.lib(inet.obj) : error LNK2001: 无法解析的外部符号 __imp__InternetCanonicalizeUrlA@16
1>nafxcw.lib(inet.obj) : error LNK2001: 无法解析的外部符号 __imp__InternetQueryOptionA@16
1>nafxcw.lib(inet.obj) : error LNK2001: 无法解析的外部符号 __imp__InternetSetOptionExA@20
1>nafxcw.lib(inet.obj) : error LNK2001: 无法解析的外部符号 __imp__InternetSetCookieA@12
1>nafxcw.lib(inet.obj) : error LNK2001: 无法解析的外部符号 __imp__InternetGetCookieA@16
1>nafxcw.lib(inet.obj) : error LNK2001: 无法解析的外部符号 __imp__InternetQueryDataAvailable@16
1>nafxcw.lib(inet.obj) : error LNK2001: 无法解析的外部符号 __imp__FtpDeleteFileA@8
1>nafxcw.lib(inet.obj) : error LNK2001: 无法解析的外部符号 __imp__FtpRenameFileA@12
1>nafxcw.lib(inet.obj) : error LNK2001: 无法解析的外部符号 __imp__FtpCreateDirectoryA@8
1>nafxcw.lib(inet.obj) : error LNK2001: 无法解析的外部符号 __imp__FtpRemoveDirectoryA@8
1>nafxcw.lib(inet.obj) : error LNK2001: 无法解析的外部符号 __imp__FtpSetCurrentDirectoryA@8
1>nafxcw.lib(inet.obj) : error LNK2001: 无法解析的外部符号 __imp__FtpGetCurrentDirectoryA@12
1>nafxcw.lib(inet.obj) : error LNK2001: 无法解析的外部符号 __imp__FtpPutFileA@20
1>nafxcw.lib(inet.obj) : error LNK2001: 无法解析的外部符号 __imp__FtpGetFileA@28
1>nafxcw.lib(inet.obj) : error LNK2001: 无法解析的外部符号 __imp__InternetErrorDlg@20
1>nafxcw.lib(inet.obj) : error LNK2001: 无法解析的外部符号 __imp__HttpAddRequestHeadersA@16
上面提的nafxcw.lib,根本没用到呀,在动态DLL编译正常,转为静态时出错

解决方案 »

  1.   

    工程设置改变了?Header
     Declared in Wininet.h.
     
    Library
     Use Wininet.lib.
      

  2.   


    这个lib加了还是一样,你说的工程设置是什么?,我就改变了运行库为MT,在静态库使用就出现这个错误
      

  3.   

    CString socketparameter::GetData(CString strURL)
    {
    CInternetSession session;
        CHttpFile *file = NULL;
        CString strHtml = "" ;   //存放网页数据
       try{
           file = (CHttpFile*)session.OpenURL(strURL);
          }
    catch(CInternetException * m_pException)
    {
           file = NULL;
           m_pException->m_dwError;
           m_pException->Delete();
           session.Close();
    }
    CString strLine;
    if(file != NULL)
    {
           while(file->ReadString(strLine)!= NULL)
       {
           strHtml += strLine;
       }
     
    }
    session.Close();
    file->Close();
    delete file;
    file = NULL;
    return strHtml;
    }添加一段代码,就是这段代码出了问题,动态编译下可以,静态就出错。查了很多人说是CInternetSession 的问题,但是就是没有解决办法