VC问题 错误请高手指点

来源:百度知道 编辑:UC知道 时间:2024/07/07 18:40:56
--------------------Configuration: Term - Win32 Debug--------------------
Linking...
TermView.obj : error LNK2001: unresolved external symbol "protected: virtual void __thiscall CTermView::OnEndPrinting(class CDC *,struct CPrintInfo *)" (?OnEndPrinting@CTermView@@MAEXPAVCDC@@PAUCPrintInfo@@@Z)
TermView.obj : error LNK2001: unresolved external symbol "protected: virtual void __thiscall CTermView::OnBeginPrinting(class CDC *,struct CPrintInfo *)" (?OnBeginPrinting@CTermView@@MAEXPAVCDC@@PAUCPrintInfo@@@Z)
TermView.obj : error LNK2001: unresolved external symbol "protected: virtual int __thiscall CTermView::OnPreparePrinting(struct CPrintInfo *)" (?OnPreparePrinting@CTermView@@MAEHPAUCPrintInfo@@@Z)
Debug/Term.exe : fatal error LNK1120: 3 unresolved externals
Error executing link.exe.

Term.exe - 4 error(s), 0 warning(s)

请高手指点下
问题补充:我做了以下的修改 project->setting->c/c++->code generation 把 debug mult

默认的配置别改,
1.project->Add to project->Files 选中TermView.cpp TermView.h 确定!
2.File->Save All!

这种问题的原因是缺少实现文件,看错误提示可能是CTermView 类没有实现文件,或实现文件没有加到工程中。
保持默认配置,不要做其他修改。

看看FileView中的Source Files中少不少TermView.cpp这个文件,没有就加上去

"我做了以下的修改 project->setting->c/c++->code generation 把 debug multithreaded dll 修改为 debug multithread 结果报错"
这个还是要改回去,改成"/MD"方式.

"Linking...
TermView.obj : error LNK2001: unresolved external symbol "protected: virtual void __thiscall CTermView::OnEndPrinting(class CDC *,struct CPrintInfo *)" (?OnEndPrinting@CTermView@@MAEXPAVCDC@@PAUCPrintInfo@@@Z)
TermView.obj : error LNK2001: unresolved external symbol "protected: virtual void __thiscall CTermView::OnBeginPrinting(class CDC *,struct CPrintInfo *)" (?OnBeginPrinting@CTermView@@MAEXPAVCDC@@PAUCPrintInfo@@@Z)
TermView.obj : error LNK2001: unresolved external symbol "protected: virtual int __thisca