记录一次c++编程时发现的问题

报错

undefined reference undefined reference to `Student::~Student()'

下面还有类似的好几行,翻译过来就是未定义的引用析构函数,也没有显示错误的行数,找了半天都没找到原因

之后发现原来是析构函数忘记加'{}'

改成~Student(){} 之后就正确了

~Student(){};//析构

c++ undefined reference的更多相关文章

  1. (转) Qt 出现“undefined reference to `vtable for”原因总结

    由于Qt本身实现的机制所限,我们在使用Qt制作某些软件程序的时候,会遇到各种各样这样那样的问题,而且很多是很难,或者根本找不到原因的,即使解决了问题,如果有人问你为什么,你只能回答--不知道. 今天我 ...

  2. undefined reference to `__android_log_print'

    使用android studio 编写NDK代码时出现错误:undefined reference to `__android_log_print' 解决办法: eclipse       andro ...

  3. CentOS 6.5 编译 PHP-7 报错:undefined reference to `libiconv_open 无法编译 PHP libiconv

    ./configure --with-mysql=/backup/mysql --with-freetype-dir --with-jpeg-dir --with-png-dir --with-zli ...

  4. Qt - 错误总结 - 在自定义类头文件中添加Q_OBJECT 编译时报错(undefined reference to ‘vtable for xxThread)

    错误提示:在添加的QThread子类头文件添加Q_OBJECT时,编译程序,出现"undefined reference to 'vtable for xxThread'"错误提示 ...

  5. Qt经典出错信息之undefined reference to `vtable for classname

    原文链接:Qt经典出错信息之undefined reference to `vtable for classname 这个出错信息太常见了,用过Qt两个月以上的朋友基本上都能自己解决了,因为太经典了, ...

  6. 解决undefined reference to `__poll_chk@GLIBC_2.16' 错误

    出现这个错误,是系统的glibc版本太低了,需要更新 到http://ftp.gnu.org/gnu/glibc/下载新版本的glibc,也不用太高,我选择glibc-2.20.tar.gz   解压 ...

  7. ubuntu系统下,gsl 库链接问题 -undefined reference to `cblas_xxx`

    今天在ubuntu系统下进行程序调试的时候出现以下错误信息: [ %] Linking CXX executable ../test_coco /usr/local/lib/libgsl.so: un ...

  8. Android APP使用NDK编译后的ffmpeg库出现undefined reference to 'posix_memalign'错误

    在android程序中使用NDK编译后的ffmpeg库的时候出现了如下错误: jni/libs/libavutil.a(mem.o): in function av_malloc:libavutil/ ...

  9. undefined reference to `Spreadsheet::staticMetaObject'

    <C++ GUI Qt 4 编程>学习 一.遇到的问题 在学完第4章后,Spreasheet程序也已经写好了.在用 FindDialog 搜索时发现没有效果. 二.解决过程 调试跟踪代码, ...

  10. undefined reference to `dlopen'

    g++ -O0 -g3 -I. -Ithird/json -Ithird/core/include -Ithird/vite/include -Ithird/openfst-1.2.10/src/in ...

随机推荐

  1. 用传纸条讲 HTTPS

    我和小宇早恋了,上课的时候老说话. 老师把我们的座位分得很远,我在第一排,她在最后一排,我们中间隔了很多人. 但我们还是想通过传纸条的方式交流. 我们中间的那些同学,虽然坏心思比较多,但好在可以保证将 ...

  2. Check Directory Existence in Shell

    The following command in one line can check if a directory exists. You can check the return value (& ...

  3. 【MySQL】自定义数据库连接池和开源数据库连接池的使用

    数据库连接池的概念 数据库连接背景 数据库连接是一种关键的.有限的.昂贵的资源,这一点在多用户的网页应用程序中体现得尤为突出.对数据库连接的管理能显著影响到整个应用程序的伸缩性和健壮性,影响到程序的性 ...

  4. 算法入门 - 动态数组的实现(Java版本)

    静态数组 Java中最基本的数组大家肯定不会陌生: int[] array = new int[6]; for (int i = 0; i < array.length; i++){ array ...

  5. 题解 b

    传送门 考场上只会暴力 \(n^4\) DP,部分分还写炸了 但其实这个DP可以前缀和优化到 \(n^3\) ,我觉得没有这档部分分就没写 但其实是有这一档的,我没有看出来-- 正解想不到 如果我们已 ...

  6. SpringBoot集成websocket(Spring方式)

    SpringWebSocketConfig配置 package com.meeno.chemical.socket.task.config; import com.meeno.chemical.soc ...

  7. MySQL 数据库、数据表、数据的基本操作

    1.数据库(database)管理 1.1 create 创建数据库 create database firstDB; 1.2 show 查看所有数据库 mysql> show database ...

  8. COM笔记-关于HRESULT

    HRESULT HRESULT(Here's the RESULT)值分成32位值, HRESULT值中16到30这15个比特位包含的是设备代码.设备代码标识的是可以返回HRESULT返回代码的操作系 ...

  9. 【spring 注解驱动开发】spring组件注册

    尚学堂spring 注解驱动开发学习笔记之 - 组件注册 组件注册 1.@Configuration&@Bean给容器中注册组件 2.@ComponentScan-自动扫描组件&指定扫 ...

  10. mzy git学习,分支冲突,以及冲突解决(五)

    冲突解决: 先尝试制造冲突: 首先我:git checkout -b mzy 创建一个mzy的分支 然后在其中修改readme.txt文件,随便加上一点东西. vim readme.txt   wri ...