Q_OBJECT 导致 error: undefined reference to `vtable for XXXX' 错误

简介: Q_OBJECT 导致 error: undefined reference to `vtable for XXXX' 错误

在 Qt 编译环境下,自定义类继承 Qt 类时,程序报错 error: undefined reference to `vtable for XXXX'。这个错误看起来是虚函数表无法引用到,也就是继承 Qt 类失败了。


       解决方案:删除编译文件夹,重新 rebuild 工程。

---------------------

作者:l357630798

来源:CSDN

原文:https://blog.csdn.net/l357630798/article/details/79357516

版权声明:本文为博主原创文章,转载请附上博文链接!


相关文章
|
4月前
|
关系型数据库 MySQL
mysql: error while loading shared libraries: libncurses.so.5: cannot open shared object file
mysql: error while loading shared libraries: libncurses.so.5: cannot open shared object file
148 0
|
4月前
|
小程序 前端开发 API
【微信小程序】TypeError: Cannot read property ‘get‘ of undefined & Error: MiniProgramError
【微信小程序】TypeError: Cannot read property ‘get‘ of undefined & Error: MiniProgramError
|
3月前
|
Python
【Error】DeprecationWarning: executable_path has been deprecated, please pass in a Service object
【Error】DeprecationWarning: executable_path has been deprecated, please pass in a Service object
47 2
|
4月前
|
资源调度 前端开发
编译第三方前端项目时候出现Syntax Error: TypeError: Cannot set properties of undefined (setting ‘parent‘)
编译第三方前端项目时候出现Syntax Error: TypeError: Cannot set properties of undefined (setting ‘parent‘)
369 0
|
11月前
|
XML 关系型数据库 MySQL
【MySQL异常】ExecutorException: Error getting generated key or setting result to parameter object
【MySQL异常】ExecutorException: Error getting generated key or setting result to parameter object
291 0
|
25天前
|
XML 缓存 API
【Azure API 管理】使用APIM进行XML内容读取时遇见的诡异错误 Expression evaluation failed. Object reference not set to an instance of an object.
【Azure API 管理】使用APIM进行XML内容读取时遇见的诡异错误 Expression evaluation failed. Object reference not set to an instance of an object.
|
2月前
|
关系型数据库 MySQL
mysql: error while loading shared libraries: libncurses.so.5: cannot open shared object file
mysql: error while loading shared libraries: libncurses.so.5: cannot open shared object file
124 2
|
4月前
|
缓存 Ubuntu Linux
error while loading shared libraries: libxcb-icccm.so.4: cannot open shared object file: No such file or directory 问题如何处理
【5月更文挑战第16天】error while loading shared libraries: libxcb-icccm.so.4: cannot open shared object file: No such file or directory 问题如何处理
429 0
|
9月前
Uncaught runtime errors: × ERROR Cannot read properties of undefined (reading ‘ vue2&vue-router兼容性问题
Uncaught runtime errors: × ERROR Cannot read properties of undefined (reading ‘ vue2&vue-router兼容性问题
298 0
|
10月前
Fatal error: Call to undefined function openssl_pkey_get_private()
Fatal error: Call to undefined function openssl_pkey_get_private()
61 0