其实可以确定就是afxwin.h的问题,但是奇怪的是我加了他的头文件为什么没效果呢??

解决方案 »

  1.   

    error LNK2001: 无法解析的外部符
    不是没声明,而是没找到定义
    确定已经重载了这个函数?
      

  2.   

    ??????这些函数都是MFC的系统函数啊
      

  3.   

    afxwin.h不是MFC的主要头文件吗?我原来还有个atl问题,加了atlbase.h之后就好了,但是这个死活没用,郁闷
      

  4.   

    我发现把链接从动态改为静态就没问题了,但是我的程序应用要求必须是静态啊,好郁闷。
    错误 501 error LNK2019: 无法解析的外部符号 "public: virtual int __thiscall CFile::Open(wchar_t const *,unsigned int,class CFileException *)" (?Open@CFile@@UAEHPB_WIPAVCFileException@@@Z),该符号在函数 "public: void __thiscall CSmartPointerApp::OutPutLog(class ATL::CStringT<wchar_t,class StrTraitMFC<wchar_t,class ATL::ChTraitsCRT<wchar_t> > >)" (?OutPutLog@CSmartPointerApp@@QAEXV?$CStringT@_WV?$StrTraitMFC@_WV?$ChTraitsCRT@_W@ATL@@@@@ATL@@@Z) 中被引用 SmartPointer.obj
    void CSmartPointerApp::OutPutLog( CString str)
    {
    CFile File;
    CString strSaveDataPath;
    strSaveDataPath = m_strProgramPath + _T("\\DebugInfo.log");
    if( File.Open(strSaveDataPath,CFile::modeReadWrite|CFile::modeNoInherit ) )
    {
    CTime tm;
    CString strTime,strTemp;
    tm = CTime::GetCurrentTime();
    strTime = tm.Format(_T("%Y-%m-%d %H:%M:%S "));
    strTemp = strTime+str+_T("\r\n"); DWORD dwLength = File.SeekToEnd();
    if(dwLength >10000)
    {
    File.SetLength(0);
    }
    File.Write(strTemp, strTemp.GetLength()*2);
    File.Close();
    }而红色标出的open是在afx.h中的File类的调用函数。求大神看看啊,谢谢
      

  5.   

    估计是缺少了消息映射段.H DECLARE_MESSAGE_MAP
    .cpp BEGIN_MESSAGE_MAP  END_MESSAGE_MAP
      

  6.   

    有的
    BEGIN_MESSAGE_MAP(CSmartPointerApp, CWinApp)
    ON_COMMAND(ID_HELP, OnHelp)
    END_MESSAGE_MAP()
      

  7.   

    主要是这个缺少的是在CWnd这个系统库中的,所以我就不知道怎么改了。个人估计是写了申明没有写实现。但是系统库怎么会有这种问题
    错误 260 error LNK2019: 无法解析的外部符号 "public: virtual long __thiscall CWnd::get_accSelection(struct tagVARIANT *)" (?get_accSelection@CWnd@@UAEJPAUtagVARIANT@@@Z),该符号在函数 "protected: void __thiscall CGlassDialog::OnTimer(unsigned int)" (?OnTimer@CGlassDialog@@IAEXI@Z) 中被引用 GlassDialog.obj
    void CGlassDialog::OnTimer(UINT nIDEvent)
    {
    if( nIDEvent == IDT_TIMER_CREATE )
    MakeGlass();
    if( nIDEvent == IDT_TIMER_DESTROY )
    MakeTransparent();
    CDialog::OnTimer(nIDEvent);
    }
      

  8.   

    stdafx.h中不对??是这个意思吗?
      

  9.   

    你最好用2008新建一个mfc程序看看,2008与6.0很多库函数返回值类型都不同,比如void变成了hresult,这样的话你必须返回一个值。
      

  10.   

    但是getThisMessageMap是系统函数啊,系统函数不是vc6.0安装的时候就自动默认安装的嘛,难道2008重写了这个函数?我看了好像没有啊
      

  11.   

    http://www.baidu.com/s?wd=GetThisMessageMap+site%3Amicrosoft.com&rsv_bp=0&ch=&tn=baidu&bar=&rsv_spt=3&ie=utf-8&inputT=7047https://www.google.com.hk/search?hl=zh-CN&source=hp&q=GetThisMessageMap&btnG=Google+%E6%90%9C%E7%B4%A2&gbv=2
      

  12.   


    google 怎么打不开
    在c:\windows\system32\drivers\etc\hosts文件后面添加以下内容:
    91.213.30.151     www.google.com
    91.213.30.151     google.com
    74.125.20.31      www.google.com.hk
    74.125.20.31      accounts.google.com
    74.125.20.31      accounts.l.google.com
    74.125.20.31      google.com
    74.125.20.31      www.google.com
    74.125.20.31      csi.gstatic.com
    74.125.20.31      ssl.gstatic.com
    74.125.20.31      ssl.google-analytics.com
    74.125.20.31      www.google-analytics.com7
    74.125.20.31      scholar.google.com
    74.125.20.31      safebrowsing.google.com
    74.125.20.31      gmail.com
    74.125.20.31      mail.google.com
    74.125.20.31      play.google.com
    74.125.20.31      news.google.com
    74.125.20.31      plus.google.com
    74.125.20.31      code.google.com
    74.125.20.31      tools.google.com
    74.125.20.31      productforums.google.com
    74.125.20.31      translate.google.com
    74.125.20.31      chrome.google.com
    74.125.20.31      youtube.com
    74.125.20.31      www.youtube.com3
    74.125.20.31      talk.google.com
    74.125.20.31      talkgadget.google.com
    74.125.20.31      apis.google.com
    74.125.20.31      clients1.google.com
    74.125.20.31      clients2.google.com
    74.125.20.31      clients3.google.com
    74.125.20.31      clients4.google.com
    74.125.20.31      clients5.google.com
    74.125.20.31      clients6.google.com
    74.125.20.31      clients7.google.com
    74.125.20.31      googleusercontent.com
    74.125.20.31      lh1.googleusercontent.com
    74.125.20.31      lh2.googleusercontent.com
    74.125.20.31      lh3.googleusercontent.com
    74.125.20.31      lh4.googleusercontent.com
    74.125.20.31      lh5.googleusercontent.com
    74.125.20.31      lh6.googleusercontent.com
    74.125.20.31      lh7.googleusercontent.com
    74.125.20.31      local.google.com
    74.125.20.31      m.google.com
    74.125.20.31      map.google.com
    74.125.20.31      maps.google.com
    74.125.20.31      maps.google.com.hk
    74.125.20.31      maps.l.google.com
    74.125.20.31      maps-api-ssl.google.com
    74.125.20.31      maps.gstatic.com
    74.125.20.31      maps.googleapis.com
    74.125.20.31      gmaps-samples-flash.googlecode.com
    74.125.20.31      earth.google.com
    74.125.20.31      earth-api-samples.googlecode.com
    74.125.20.31      earthengine.googlelabs.com