debug模式编译通过,但release模式不通过。
debug模式编译通过,但release模式不通过。
OnExit,OnClear,OnStop,OnStart是工具栏的按钮命令函数,参照其他工程,我自己加上去的。
CreateExToolBar是普通定义的方法,放到int CMainFrame::OnCreate(LPCREATESTRUCT lpCreateStruct)中调用。
--------------------Configuration: Server - Win32 Release--------------------
Compiling...
MainFrm.cpp
Server.cpp
Generating Code...
Linking...
MainFrm.obj : error LNK2001: unresolved external symbol "protected: void __thiscall CMainFrame::OnExit(void)" (?OnExit@CMainFrame@@IAEXXZ)
MainFrm.obj : error LNK2001: unresolved external symbol "protected: void __thiscall CMainFrame::OnClear(void)" (?OnClear@CMainFrame@@IAEXXZ)
MainFrm.obj : error LNK2001: unresolved external symbol "protected: void __thiscall CMainFrame::OnStop(void)" (?OnStop@CMainFrame@@IAEXXZ)
MainFrm.obj : error LNK2001: unresolved external symbol "protected: void __thiscall CMainFrame::OnStart(void)" (?OnStart@CMainFrame@@IAEXXZ)
MainFrm.obj : error LNK2001: unresolved external symbol "public: int __thiscall CMainFrame::CreateExToolBar(void)" (?CreateExToolBar@CMainFrame@@QAEHXZ)
Release/Server.exe : fatal error LNK1120: 5 unresolved externals
Error executing link.exe.
Server.exe - 6 error(s), 0 warning(s)
不明白为什么这样。