--------------------Configuration: Welcome - Win32 Debug--------------------
Compiling...
Welcome.cpp
Linking...
Welcome.obj : error LNK2001: unresolved external symbol "public: static struct CRuntimeClass const CWelcomeDoc::classCWelcomeDoc" (?classCWelcomeDoc@CWelcomeDoc@@2UCRuntimeClass@@B)
Welcome.obj : error LNK2001: unresolved external symbol "public: static struct CRuntimeClass const CMainFrame::classCMainFrame" (?classCMainFrame@CMainFrame@@2UCRuntimeClass@@B)
Welcome.obj : error LNK2001: unresolved external symbol "public: static struct CRuntimeClass const CWelcomeView::classCWelcomeView" (?classCWelcomeView@CWelcomeView@@2UCRuntimeClass@@B)
nafxcwd.lib(thrdcore.obj) : error LNK2001: unresolved external symbol __endthreadex
nafxcwd.lib(thrdcore.obj) : error LNK2001: unresolved external symbol __beginthreadex
Debug/Welcome.exe : fatal error LNK1120: 5 unresolved externals
Error executing link.exe.Welcome.exe - 6 error(s), 0 warning(s)

解决方案 »

  1.   

    在Project->setting->link->project options里,看参数是 /subsystem:windows
    还是 /subsystem:console
      

  2.   

    是/subsystem:windows 啊。怎么办呢?
      

  3.   

    nafxcwd.lib(thrdcore.obj) : error LNK2001: unresolved external symbol __endthreadex
    nafxcwd.lib(thrdcore.obj) : error LNK2001: unresolved external symbol __beginthreadex
    是程序需要多线呈支持,在Project->setting->c/c++ 选code generation 下的debug multithreaded dll
      

  4.   

    laiyiling(最熟悉的陌生人)你好!我改为在Project->setting->c/c++ 选code generation 下的debug multithreaded dll
    了,但是错误就更多了,如下,请帮忙看一下啦!
    --------------------Configuration: Welcome - Win32 Debug--------------------
    Compiling...
    Welcome.cpp
    Linking...
    Welcome.obj : error LNK2001: unresolved external symbol "public: static struct CRuntimeClass const CWelcomeDoc::classCWelcomeDoc" (?classCWelcomeDoc@CWelcomeDoc@@2UCRuntimeClass@@B)
    Welcome.obj : error LNK2001: unresolved external symbol "public: static struct CRuntimeClass const CMainFrame::classCMainFrame" (?classCMainFrame@CMainFrame@@2UCRuntimeClass@@B)
    Welcome.obj : error LNK2001: unresolved external symbol "public: static struct CRuntimeClass const CWelcomeView::classCWelcomeView" (?classCWelcomeView@CWelcomeView@@2UCRuntimeClass@@B)
    nafxcwd.lib(appcore.obj) : error LNK2001: unresolved external symbol ___argv
    nafxcwd.lib(appcore.obj) : error LNK2001: unresolved external symbol ___argc
    nafxcwd.lib(olelink.obj) : error LNK2001: unresolved external symbol __mbctype
    nafxcwd.lib(dcmeta.obj) : error LNK2001: unresolved external symbol __mbctype
    nafxcwd.lib(filelist.obj) : error LNK2001: unresolved external symbol __mbctype
    nafxcwd.lib(timecore.obj) : error LNK2001: unresolved external symbol __mbctype
    nafxcwd.lib(apphelp.obj) : error LNK2001: unresolved external symbol __mbctype
    nafxcwd.lib(oledlgs1.obj) : error LNK2001: unresolved external symbol __mbctype
    Debug/Welcome.exe : fatal error LNK1120: 6 unresolved externals
    Error executing link.exe.Welcome.exe - 12 error(s), 0 warning(s)
      

  5.   

    还有在Project setting->general标签页中,microsoft foundation class可选
    not use mfc
    use mfc as dll
    use mfc static library
    必须选中下面两项其中之一。因为你使用了mfc类库,必须加载相应的编译用的库。
    检查是否是这个问题
      

  6.   

    谢谢大家了,不过还有一点错误。望大家指点。再次谢谢啊!
    --------------------Configuration: Welcome - Win32 Debug--------------------
    Linking...
    Welcome.obj : error LNK2001: unresolved external symbol "public: static struct CRuntimeClass const CWelcomeDoc::classCWelcomeDoc" (?classCWelcomeDoc@CWelcomeDoc@@2UCRuntimeClass@@B)
    Welcome.obj : error LNK2001: unresolved external symbol "public: static struct CRuntimeClass const CMainFrame::classCMainFrame" (?classCMainFrame@CMainFrame@@2UCRuntimeClass@@B)
    Welcome.obj : error LNK2001: unresolved external symbol "public: static struct CRuntimeClass const CWelcomeView::classCWelcomeView" (?classCWelcomeView@CWelcomeView@@2UCRuntimeClass@@B)
    Debug/Welcome.exe : fatal error LNK1120: 3 unresolved externals
    Error executing link.exe.Welcome.exe - 4 error(s), 0 warning(s)
      

  7.   

    产生改问题的原因可能有,
    1,引用了头文件的函数,但是没有相应的实现代码;
    2,没有包含相应的cpp文件或库文件;
    我估计可能是动态创建的问题,在头文件中DECLARE_DYNAMIC_CREATE,在cpp文件中
    则有相应的IMPLEMENT_DYNAMIC()具体的表达式参考MSDN或相关书籍。他们必须是
    一对,否则肯定报错。