nafxcwd.lib(thrdcore.obj) : error LNK2001: unresolved external symbol __endthreadex
nafxcwd.lib(thrdcore.obj) : error LNK2001: unresolved external symbol __beginthreadex
Debug/gg.exe : fatal error LNK1120: 2 unresolved externals
Error executing link.exe.
这是哪里出错呀,

解决方案 »

  1.   

    没有将需要的.lib文件加入到LINK中
      

  2.   

    通常是你在thrdcore中调用了某个函数,但是没有包含它所在的连接库,
    可能是nafxcwd.lib库,把它加入看看。
      

  3.   

    我加咯,这些代码有问题吗。
    gg.h
    \\\\\\\\\\\\\\\\\\\\\\\\\#include "resource.h"class CCCapp : public CWinApp
    {
    public: virtual BOOL InitInstance();

    };
    \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
    CSelectNum.h
    \\\\\\\\\\\\\\\\\\\\\\\\\\\\\
    #include "afxwin.h"
    #include "resource.h"class CCSelectNum : public CButton
    {
    // Construction
    public:
    CCSelectNum();// Attributes
    public:// Operations
    public:// Overrides
    // ClassWizard generated virtual function overrides
    //{{AFX_VIRTUAL(CCSelectNum)
    //}}AFX_VIRTUAL// Implementation
    public:
    virtual ~CCSelectNum(); // Generated message map functions
    protected:
    //{{AFX_MSG(CCSelectNum)
    afx_msg void OnSelectOne();
    afx_msg void OnSelectTwo();
    afx_msg void OnSelectThree();
    afx_msg void OnSelectFour();
    afx_msg void OnSelectFif();
    afx_msg void OnSelectSix();
    afx_msg void OnSelectSeven();
    afx_msg void OnSelectEight();
    afx_msg void OnSelectNine();
    afx_msg void OnSelectZero();
    afx_msg void OnSelectPoint();
    afx_msg void OnJf();
    afx_msg void OnAdd();
    afx_msg void OnMul();
    afx_msg void OnDiv();
    afx_msg void OnDtoH();
    afx_msg void OnDtoB();
    afx_msg void OnResult();
    afx_msg void OnClearZero();
    afx_msg void OnHtoD();
    afx_msg void OnBtoD();
    //}}AFX_MSG DECLARE_MESSAGE_MAP()
    };
    \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
    CCwinFrm.h
    \\\\\\\\\\\\\\\\\\\\
    #include "afxwin.h"class CCCwinFrm : public CFrameWnd
    {
    public:
    CCCwinFrm();
    virtual ~CCCwinFrm();};
    \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
    gg.cpp
    \\\\\\\\\\\\\\\\\\\
    #include "afxwin.h"
    #include "gg.h"
    #include "CCwinFrm.h"
    #include "resource.h"
    #include "CSelectNum.h"
    /////////////////////////////////////////////////////////////////////////////
    // CDialogAppCCCapp theApp;BOOL CCCapp::InitInstance()
    {
    *m_pMainWnd = new CCCwinFrm;
        m_pMainWnd->ShowWindow (m_nCmdShow);
        m_pMainWnd->UpdateWindow ();
        return TRUE;
    }
    \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
    CSelectNum.cpp
    \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
    #include "resource.h"
    #include "CSelectNum.h"
    #include "afxwin.h"
    /////////////////////////////////////////////////////////////////////////////
    // CCSelectNumCCSelectNum::CCSelectNum()
    {
    }CCSelectNum::~CCSelectNum()
    {
    }
    BEGIN_MESSAGE_MAP(CCSelectNum, CButton)
    //{{AFX_MSG_MAP(CCSelectNum)
    ON_BN_CLICKED(IDC_BUTTON1, OnSelectOne)
    ON_BN_CLICKED(IDC_BUTTON2, OnSelectTwo)
    ON_BN_CLICKED(IDC_BUTTON3, OnSelectThree)
    ON_BN_CLICKED(IDC_BUTTON4, OnSelectFour)
    ON_BN_CLICKED(IDC_BUTTON5, OnSelectFif)
    ON_BN_CLICKED(IDC_BUTTON6, OnSelectSix)
    ON_BN_CLICKED(IDC_BUTTON7, OnSelectSeven)
    ON_BN_CLICKED(IDC_BUTTON8, OnSelectEight)
    ON_BN_CLICKED(IDC_BUTTON9, OnSelectNine)
    ON_BN_CLICKED(IDC_BUTTON10, OnSelectZero)
    ON_BN_CLICKED(IDC_BUTTON11, OnSelectPoint)
    ON_BN_CLICKED(IDC_BUTTON12, OnJf)
    ON_BN_CLICKED(IDC_BUTTON13, OnAdd)
    ON_BN_CLICKED(IDC_BUTTON14, OnMul)
    ON_BN_CLICKED(IDC_BUTTON15, OnDiv)
    ON_BN_CLICKED(IDC_BUTTON16, OnDtoH)
    ON_BN_CLICKED(IDC_BUTTON18, OnDtoB)
    ON_BN_CLICKED(IDC_BUTTON19, OnResult)
    ON_BN_CLICKED(IDC_BUTTON20, OnClearZero)
    ON_BN_CLICKED(IDC_BUTTON21, OnHtoD)
    ON_BN_CLICKED(IDC_BUTTON22, OnBtoD)
    //}}AFX_MSG_MAP
    END_MESSAGE_MAP()/////////////////////////////////////////////////////////////////////////////
    // CCSelectNum message handlersvoid CCSelectNum::OnSelectOne() 
    {
    // TODO: Add your control notification handler code here

    }void CCSelectNum::OnSelectTwo() 
    {
    // TODO: Add your control notification handler code here

    }void CCSelectNum::OnSelectThree() 
    {
    // TODO: Add your control notification handler code here

    }void CCSelectNum::OnSelectFour() 
    {
    // TODO: Add your control notification handler code here

    }void CCSelectNum::OnSelectFif() 
    {
    // TODO: Add your control notification handler code here

    }void CCSelectNum::OnSelectSix() 
    {
    // TODO: Add your control notification handler code here

    }void CCSelectNum::OnSelectSeven() 
    {
    // TODO: Add your control notification handler code here

    }void CCSelectNum::OnSelectEight() 
    {
    // TODO: Add your control notification handler code here

    }void CCSelectNum::OnSelectNine() 
    {
    // TODO: Add your control notification handler code here

    }void CCSelectNum::OnSelectZero() 
    {
    // TODO: Add your control notification handler code here

    }void CCSelectNum::OnSelectPoint() 
    {
    // TODO: Add your control notification handler code here

    }void CCSelectNum::OnJf() 
    {
    // TODO: Add your control notification handler code here

    }void CCSelectNum::OnAdd() 
    {
    // TODO: Add your control notification handler code here

    }void CCSelectNum::OnMul() 
    {
    // TODO: Add your control notification handler code here

    }void CCSelectNum::OnDiv() 
    {
    // TODO: Add your control notification handler code here

    }
    void CCSelectNum::OnDtoH() 
    {
    // TODO: Add your control notification handler code here

    }void CCSelectNum::OnDtoB() 
    {
    // TODO: Add your control notification handler code here

    }void CCSelectNum::OnResult() 
    {
    // TODO: Add your control notification handler code here

    }void CCSelectNum::OnClearZero() 
    {
    // TODO: Add your control notification handler code here

    }void CCSelectNum::OnHtoD() 
    {
    // TODO: Add your control notification handler code here

    }void CCSelectNum::OnBtoD() 
    {
    // TODO: Add your control notification handler code here

    }
    \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
    CwinFrm.cpp
    \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
    #include "CCwinFrm.h"//////////////////////////////////////////////////////////////////////
    // Construction/Destruction
    //////////////////////////////////////////////////////////////////////CCCwinFrm::CCCwinFrm()
    {
    Create(NULL,_T("the select"));
    }CCCwinFrm::~CCCwinFrm()
    {
    delete CCCwinFrm;
    }
      

  4.   

    你的代码没有问题,编译也可以通过。只是最后连接(link)的时候出的毛病。选菜单:project->settings->link选项卡,在Object/library moduls:中加入afxwin.lib
      

  5.   

    我加咯,但不能打开afxwin.lib,这是什么原因呀
      

  6.   

    没有将需要的.lib文件加入到LINK中,debug,release中都需要加入该.lib文件。