无法解析的外部符号 "public: virtual struct CRuntimeClass
来源:互联网 发布:象牙塔社交软件 编辑:程序博客网 时间:2024/05/16 13:38
无法解析的外部符号 "public: virtual struct CRuntimeClass * __thiscall CMessageBox::GetRuntimeClass(void)const "
以下原因是会引起上述错误的:
1,在.h文件中写了DECLARE_DYNAMIC,而在.cpp文件中没有写IMPLEMENT_DYNAMIC
2,在.h文件中写了DECLARE_DYNCREATE ,但在.cpp文件中没有写上IMPLEMENT_DYNCREATE
在编写自定义类时,你必须知道,如果在类定义中包含了DECLARE_DYNAMIC,那你必须在类声明中包含IMPLEMENT_DYNAMIC;如果在类定义中包含了DECLARE_DYNCREATE,你必须在类声明中包含IMPLEMENT_DYNCREATE
.h类中定义
DECLARE_DYNCREATE(CMyWinThread)
DECLARE_MESSAGE_MAP()
.cpp类中定义
IMPLEMENT_DYNAMIC(CMyWinThread,CWinThread)
BEGIN_MESSAGE_MAP(CMyWinThread, CWinThread)
END_MESSAGE_MAP()
只需要记住:消息映射在.h文件和.cpp文件中是一一对应的。
- 无法解析的外部符号 "public: virtual struct CRuntimeClass
- 无法解析的外部符号 "public: virtual struct CRuntimeClass
- 无法解析的外部符号 "public: virtual struct CRuntimeClass
- LNK2001:无法解析的外部符号 "public: virtual struct CRuntimeClass *
- 无法解析的外部符号 "public: virtual struct CRuntimeClass
- 错误:无法解析的外部符号"public:virtual struct CRuntimeClass...."
- 无法解析的外部符号 "public: virtual struct CRuntimeClass
- MFC 创建UI 线程 || 无法解析的外部符号 "public: virtual struct CRuntimeClass
- error LNK2001: 无法解析的外部符号 "public: virtual struct QMetaObject const * __thiscall Widget::metaObject
- error LNK2001: 无法解析的外部符号 "public: virtual struct QMetaObject const * __thiscall Widget::metaObject
- error LNK2001: 无法解析的外部符号 "public: virtual struct QMetaObject const * __thiscall
- error LNK2001: 无法解析的外部符号 "public: virtual struct QMetaObject const * __thiscall MainWindow::metaObje
- QT error LNK2001: 无法解析的外部符号 "public: virtual struct QMetaObject const * __thiscall Widget::metaObjec
- error LNK2001: 无法解析的外部符号 "public: virtual struct QMetaObject const * __thiscall Widget::metaObject
- error LNK2001: 无法解析的外部符号 "public: virtual struct QMetaObject const * __cdecl MainWindow::metaObject(
- error LNK2001: 无法解析的外部符号 "public: virtual struct QMetaObject const * __thiscall ****::metaObj
- vs2010+qt4编译出现error LNK2001: 无法解析的外部符号 "public: virtual struct QMetaObject等错误
- QT中添加Q_OBJECT时编译提示obj : error LNK2001: 无法解析的外部符号 "public: virtual struct QMetaObject const错误解决方法
- css能让你自作一些相当复杂的形状
- JSTL 格式化
- hive的内部表与外部表创建
- 几个Linux邮件列表
- Under The Moon——4、Prison 888
- 无法解析的外部符号 "public: virtual struct CRuntimeClass
- K-MEANS算法
- 如何找出内含安卓消息推送广告的app,立波手把手教会你
- linux下查看用户的命令
- uboot环境变量与uImage中MTD分区关系
- Android frameworks中接口超过限定数量
- Web标准的概念
- poj1004
- 二分法搜索