undefined reference to `typeinfo for xxx 报错
编译成功了,链接的时候出现了这个报错
产生”undefined reference to `typeinfo for xxx’“最常见的原因就是基类的虚函数未实现了。
由于C++类的实现可以分布在多个源文件中,所以生成目标文件时,基类的虚函数没有定义是不会报错的。
但是链接成可执行文件时,需要将虚函数的信息放进typeinfo中,这个时候虚函数未实现就会引发这个错误。
.....实在不行,改成纯虚函数就好了.
undefined reference to `typeinfo for xxx 报错的更多相关文章
- Linux下编译程序时,经常会遇到“undefined reference to XXX” 报错,
Linux下编译程序时,经常会遇到“undefined reference to XXX” 报错, 这里总结一些可能的原因和解决方案,给需要的朋友: 说道undefined reference err ...
- Qt :undefined reference to vtable for "xxx::xxx"
现象: 类加上宏 Q_OBJECT 就会报错 :undefined reference to vtable for "xxx::xxx" 解决方法: 重新 qmake 其他情况,查 ...
- undefined reference to typeinfo - C++ error message
undefined reference to typeinfo - C++ error message There are some compiler and loader error message ...
- Qt错误:类中使用Q_OBJECT宏导致undefined reference to vtable for "xxx::xxx"错误的原因和解决方法
在进行Qt编程的时候,有时候会将类的定义和实现都写在源文件中,如果同时在该类中使用信号/槽,那么可能就会遇到 undefined reference to vtable for "xxx:: ...
- django startproject xxx:报错UnicodeDecodeError: 'ascii' codec can't decode byte 0xe6 in position 13: ordinal not in range(128)
django startproject xxx:报错UnicodeDecodeError: 'ascii' codec can't decode byte 0xe6 in position 13: o ...
- IDEA出现Error Loading Project: Cannot load module xxx报错
IDEA出现Error Loading Project: Cannot load module xxx报错,是因为IDEA不能找到模块xxx加载,应该是添加/新建了xxx模块,之后又删除了该模块,但没 ...
- cocos2d-x android 添加新场景报错: undefined reference to `vtable for XXX'
转载自 居家懒人 http://www.cnblogs.com/JD85/archive/2012/09/17/2688128.html 加入写了新场景SecondScene,结果在cpp文件里类名地 ...
- moc_XXXX.o:(.data.rel.ro._ZTI12CalculatorUI[_ZTI12CalculatorUI]+0x10): undefined reference to `typeinfo for QWidget' collect2: error: ld returned 1 exit status make: *** [Makefile:144: myCalculator]
main.cpp:(.text.startup+0x22): undefined reference to `QApplication::QApplication(int&, char**, ...
- Laravel5 call to undefined function openssl cipher iv length() 报错 PHP7开启OpenSSL扩展失败
在安装laravel5.5后, 访问显示报错. call to undefined function openssl cipher iv length() 经查为php7.1的OpenSSL扩展加载失 ...
随机推荐
- CSS背景颜色透明
{ filter:alpha(opacity=50); -moz-opacity:0.5; -khtml-opacity: 0.5; opacity: 0.5; } 兼容大部分主流浏览器 filter ...
- STL初步学习(set)
2.set set可以看作一个集合,可以实现自动排序(升序)和去重 在许多题目中,都可以使用这个模板库,减少很多操作,例如P1923 第k小数,当然,这道题有很多奇奇怪怪的做法,分值都不同,之后会讲解 ...
- 六.url配置
1.Django 如何处理一个请求 (1). django 加载 ROOT_URLCONF(settings.py中配置的) 指定的模块,并寻找可用的urlpatterns变量.它是 django.c ...
- Netty系列之源码解析(一)
本文首发于微信公众号[猿灯塔],转载引用请说明出处 接下来的时间灯塔君持续更新Netty系列一共九篇 当前:Netty 源码解析(一)开始 Netty 源码解析(二): Netty 的 Channel ...
- 状压DP之Bill的挑战
题目 P2167 [SDOI2009]Bill的挑战 Sheng bill不仅有惊人的心算能力,还可以轻松地完成各种统计.在昨天的比赛中,你凭借优秀的程序与他打成了平局,这导致Sheng bill极度 ...
- Java基础笔记01-02-03-04
一.今日内容介绍 1.Java开发环境搭建 2.HelloWorld案例 3.注释.关键字.标识符 4.数据(数据类型.常量) 01java语言概述 * A: java语言概述 * a: Java是s ...
- 安装更强大更美观的zsh,配置oh my zsh及插件
安装更强大更美观的zsh,配置oh my zsh及插件 #0x0 安装zsh #0x1 安装oh my zsh #0x2 配置zshrc #0x3 配置主题 #0x4 安装插件 #0x5 小结 #0x ...
- (二)pandas处理丢失数据
处理丢失数据 有两种丢失数据: None np.nan(NaN) import numpy as np type(None) NoneType type(np.nan) float 1. None N ...
- python 三维散点插值 griddata
#三维点插值#在三维空间中,利用实际点的值推算出网格点的值import numpy as np point_grid =np.array([[0.0,0.0,0.0],[0.4,0.4,0.4],[0 ...
- python利用selenium(webdriver chrome)模拟登陆获取cookie
(我是在windows下进行实验的) 准备工作: 1.安装python环境. 2.python安装selenium插件(执行以下命令就行). pip install selenium 3.Wind ...