error LNK2001: unresolved external symbol
来源:互联网 发布:行知中等职业学校 编辑:程序博客网 时间:2024/04/29 04:42
<<visual c++程序设计教程与上机指导>> 例Li2_2
编译出现问题:
Linking...
L2_1View.obj : error LNK2001: unresolved external symbol "protected: void __thiscall CL2_1View::OnKeyDown(unsigned int,unsigned int,unsigned int)" (?OnKeyDown@CL2_1View@@IAEXIII@Z)
L2_1View.obj : error LNK2001: unresolved external symbol "protected: void __thiscall CL2_1View::OnChar(unsigned int,unsigned int,unsigned int)" (?OnChar@CL2_1View@@IAEXIII@Z)
Debug/L2_1.exe : fatal error LNK1120: 2 unresolved externals
Error executing link.exe.
注释掉Li2_1View.h中下面两行则通过编译:
afx_msg void OnChar(UINT nChar,UINT nRepCnt,UINT nFlags);
afx_msg void OnKeyDown(UINT nChar,UINT nRepCnt,UINT nFlags);
但程序原来的功能没有实现:为程序添加鼠标右键按下消息,为File菜单下的Open菜单项添加消息处理函数,分析ClassWizard类向导所进行的消息映射。
在CSDN中查到有人说是库文件没添加的原因,应该打开"project->setting->Link",在Lib处添入需要的库,但不知道要添加什么库?
编译出现问题:
Linking...
L2_1View.obj : error LNK2001: unresolved external symbol "protected: void __thiscall CL2_1View::OnKeyDown(unsigned int,unsigned int,unsigned int)" (?OnKeyDown@CL2_1View@@IAEXIII@Z)
L2_1View.obj : error LNK2001: unresolved external symbol "protected: void __thiscall CL2_1View::OnChar(unsigned int,unsigned int,unsigned int)" (?OnChar@CL2_1View@@IAEXIII@Z)
Debug/L2_1.exe : fatal error LNK1120: 2 unresolved externals
Error executing link.exe.
注释掉Li2_1View.h中下面两行则通过编译:
afx_msg void OnChar(UINT nChar,UINT nRepCnt,UINT nFlags);
afx_msg void OnKeyDown(UINT nChar,UINT nRepCnt,UINT nFlags);
但程序原来的功能没有实现:为程序添加鼠标右键按下消息,为File菜单下的Open菜单项添加消息处理函数,分析ClassWizard类向导所进行的消息映射。
在CSDN中查到有人说是库文件没添加的原因,应该打开"project->setting->Link",在Lib处添入需要的库,但不知道要添加什么库?
- error LNK2001: unresolved external symbol
- error LNK2001: unresolved external symbol
- error LNK2001: unresolved external symbol
- error LNK2001: unresolved external symbol
- error LNK2001: unresolved external symbol
- error LNK2001: unresolved external symbol
- error LNK2001: unresolved external symbol
- error LNK2001: unresolved external symbol
- error LNK2001: unresolved external symbol
- error LNK2001: unresolved external symbol
- error LNK2001: unresolved external symbol
- error LNK2001: unresolved external symbol
- error LNK2001: unresolved external symbol
- error LNK2001: unresolved external symbol
- error LNK2001: unresolved external symbol
- error LNK2001: unresolved external symbol
- error LNK2001: unresolved external symbol
- error LNK2001: unresolved external symbol __endthreadex,unresolved external symbol __endthreadex
- PHP内置字符串函数实现
- Netbeans使用技巧
- JMS(Jboss Messaging)的一点使用心得(二)使用Spring
- 浅谈无线传感器网络
- EXT核心API详解(一)-Ext
- error LNK2001: unresolved external symbol
- OWL Web本体语言 指南(中文版)
- hadoop中RPC的使用方法---DEMO
- 正则表达式入门教程(写的相当好,保证看完后对正则表达式有一个全面的认识)
- EXT核心API详解(二)-Array/Date/Function/Number/String
- 第一次写博客
- EXT核心API详解(三)-Ext.Element
- 关于 ImageX 你知道多少
- MBAC人物剧情翻译——教授猫篇(A)