解决unresolved external symbol "protected: virtual struct AFX_EVENTSINKMAP const * __thiscall 错误。
2009-11-27 16:44
627 查看
刚开始学习VC++,对它的东西都不懂,其中最使用DECLARE_EVENTSINK_MAP时出现了一个错误,
Linking...
LegendWin.obj : error LNK2001: unresolved external symbol "protected: virtual struct AFX_EVENTSINKMAP const * __thiscall CLegendWin::GetEventSinkMap(void)const " (?GetEventSinkMap@CLegendWin@@MBEPBUAFX_EVENTSINKMAP@@XZ)
Debug/MySuperMap.exe : fatal error LNK1120: 1 unresolved externals
Error executing link.exe.
MySuperMap.exe - 2 error(s)
0 warning(s)
因为有 写了代码就编译验证其有没有错误的习惯,所以我在.h文件中申明了DECLARE_EVENTSINK_MAP()以后就编译,却出现错误。
原来是必须在.cpp中写出相应的代码段:
BEGIN_EVENTSINK_MAP(....,....)
相应代码.....
END_EVENTSINK_MAP()
网上搜了好久才找到解决方法的,郁闷。
Linking...
LegendWin.obj : error LNK2001: unresolved external symbol "protected: virtual struct AFX_EVENTSINKMAP const * __thiscall CLegendWin::GetEventSinkMap(void)const " (?GetEventSinkMap@CLegendWin@@MBEPBUAFX_EVENTSINKMAP@@XZ)
Debug/MySuperMap.exe : fatal error LNK1120: 1 unresolved externals
Error executing link.exe.
MySuperMap.exe - 2 error(s)
0 warning(s)
因为有 写了代码就编译验证其有没有错误的习惯,所以我在.h文件中申明了DECLARE_EVENTSINK_MAP()以后就编译,却出现错误。
原来是必须在.cpp中写出相应的代码段:
BEGIN_EVENTSINK_MAP(....,....)
相应代码.....
END_EVENTSINK_MAP()
网上搜了好久才找到解决方法的,郁闷。
相关文章推荐
- error LNK2001: unresolved external symbol "protected: virtual struct AFX_EVENTSINKMAP …改正方法。
- unresolved external symbol "protected: virtual struct AFX_MSGMAP const * __thiscall
- VC引入lib库并解决连接错误unresolved external symbol "__declspec(dllimport) const DllClass::`vftable'" (__imp_?
- error LNK2001: unresolved external symbol "protected: virtual struct AFX_MSGMAP ......
- unresolved external symbol "public: static struct 错误的原因及解决方法
- error LNK2001: unresolved external symbol "public: virtual struct QMetaObject const (转)
- error LNK2001: unresolved external symbol "public: virtual struct QMetaObject const
- error LNK2001: unresolved external symbol "protected: 类似问题的解决办法
- 【qt错误】unresolved external symbol "public: virtual struct QMetaObject
- FlashlconDlg.obj : error LNK2001: unresolved external symbol "protected: void __thiscall CFlashlconDlg::OnExit(void)" 的解决
- QT中添加Q_OBJECT时编译提示obj : error LNK2001: 无法解析的外部符号 "public: virtual struct QMetaObject const错误解决方法
- Qt编程之信号与槽-------unresolved external symbol "public: virtual struct QMetaObject const * __thiscall XX::metaObject(void)const
- error LNK2019: unresolved external symbol "public: referenced in function LNK1120: 6 unresolved externals错误解决办法
- [Qt4]VS2010编译提示error LNK2001: unresolved external symbol "public: virtual struct QMetaObject等错误解决方案
- error LNK2001: unresolved external symbol "protected: void __thiscall
- unresolved external symbol "public: virtual __thiscall...错误
- error LNK2001: unresolved external symbol "public: virtual __thiscall CppUnit的解决办法
- 解决C++ 调用 C 函数时unresolved external symbol "int __cdecl addInC1(void)" (?addInC1@@YAHXZ)之类的错误
- 错误:error LNK2001: unresolved external symbol "public: __thiscall
- 链接错误"unresolved external symbol _main"的解决