--------------------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)
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)
解决方案 »
- 寻找无锡的朋友
- 请教一个关于CFileDialog的问题
- 一个Dll程序A,隐式链接另外一个Dll程序B,在不改动A的情况下,有没有办法在B里面知道A是否处在调试状态?
- 请问任务栏中气球式提示是怎么做的呀?我看VB的好简单,不知VC中的如何做?
- 在什么时候会用到 std::vector<int> number
- 文挡视图在哪里?
- ActiveX高手请关注,呵呵.关于ActiveX版本更新
- 新一代网络动画软件出来了,全面代替 flash 请看 www.svgcn.com
- 我在程序中修改一个edit框的属性失败,原代码是这样的。。。
- 各位GG,帮帮妹妹! 请问如何获得一个子窗体的字体???谢谢 ^^
- 为什么我的DataGrid生成的类是CDatagrid而不是CDataGrid呢?
- 没有女朋友的软件工程师进来报个到,一起玩玩,交流一下泡妞的心得!哈哈!
还是 /subsystem:console
nafxcwd.lib(thrdcore.obj) : error LNK2001: unresolved external symbol __beginthreadex
是程序需要多线呈支持,在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)
not use mfc
use mfc as dll
use mfc static library
必须选中下面两项其中之一。因为你使用了mfc类库,必须加载相应的编译用的库。
检查是否是这个问题
--------------------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)
1,引用了头文件的函数,但是没有相应的实现代码;
2,没有包含相应的cpp文件或库文件;
我估计可能是动态创建的问题,在头文件中DECLARE_DYNAMIC_CREATE,在cpp文件中
则有相应的IMPLEMENT_DYNAMIC()具体的表达式参考MSDN或相关书籍。他们必须是
一对,否则肯定报错。