问题: error: undefined reference to `QApplication::QApplication(int&, char**, int)'

error: undefined reference to `QApplication::exec()'

error: undefined reference to `QApplication::~QApplication()'

解决方案:     注释掉*.pro中 QT   -= gui;

分析:“undefined reference”错误一般是在连接的时候没有找到需要的库而产生的错误。上面的程序就是由于连接时没有指定相应的 Qt 库从而造成了连接错误。这说明是 Makefile 建立得不正确。

转载于:https://blog.51cto.com/1108038/400481

Undefined reference to ...相关推荐

  1. undefined reference to 'pthread_create'问题解决(转)

    undefined reference to 'pthread_create' undefined reference to 'pthread_join' 问题原因:     pthread 库不是 ...

  2. undefined reference to `libiconv_open 无法编译PHP libiconv

    原文:http://hi.baidu.com/ostech/blog/item/a63f9b0dabed1ae7ab6457d0.html ./configure --with-mysql=/back ...

  3. 【Qt】error: undefined reference to `vtable for MainWindow‘

    1.问题描述 在写一个demo时,想尽量简单,就把MainWindow类的定义和实现都写在main.cpp中,结果编译时报错: main.cpp:-1: error: undefined refere ...

  4. 【Qt】报错error: undefined reference to `vtable for的解决方法

    1.问题描述 编译Qt程序时,在某个类构造函数定义处报错: error: undefined reference to `vtable for 2.原因分析 导致错误信息的原因是:子类没有实现父类的纯 ...

  5. 【ffmpeg】编译时报错:error: undefined reference to `av...

    1.问题描述 昨天使用ffmpeg库编译demo一切正常,今天再次链接ffmpeg库时报了一堆错误: error: undefined reference to `av_frame_alloc()' ...

  6. undefined reference to android log print,undefined reference to '__android_log_print'

    场景:undefined reference to `android_log_print' undefined reference to `__android_log_print' 原因:没有加入支持 ...

  7. undefined reference to 'WinMain@16' 的四种情况

    undefined reference to 'WinMain@16' 意思为提示找不到 WinMain 函数,WinMain是windows程序的入口函数,有几种可能: int main() 写成了 ...

  8. 报错解决:undefined reference to `snappy::MaxCompressedLength(unsigned long)'

    下午在编译phxpaxos的样例时报错了,报错如下: g++ echo_sm.o echo_server.o main.o -o phxecho -L/home/zhang/phxpaxos/.lib ...

  9. 重新编译php又出错了。undefined reference to `php_xx

    2019独角兽企业重金招聘Python工程师标准>>> main/rfc1867.lo(.text+0x1c): In function `php_mb_flush_gpc_vari ...

  10. gcc:undefined reference to 'std::cout'

    gcc says: undefined reference to 'std::cout' @ 10/17/2005 计算人生 boss让写的程序,要在linux跟windows下跑,结果我先用vs.n ...

最新文章

  1. 检索数据表中重复的记录
  2. 华为面试题之大整数相加
  3. php模板技术smarty,PHP模板技术Smarty
  4. 坡道行驶电动小车_事发红绿灯路口!东莞一女子骑电动滑板车被撞致颅内出血…...
  5. 【机器学习基础】数学推导+纯Python实现机器学习算法26:随机森林
  6. [Everyday Mathematics]20150103
  7. mybatis中的查询缓存
  8. Python刷题-6
  9. 电子相册系统(八)验证用户是否可用
  10. 计算机黑屏什么原因,教您电脑黑屏的原因是什么
  11. matlab中sl设置频率为95khz,BOOST电路设计及matlab仿真
  12. linux字符集中文转英文,oracle字符集(英文-中文)转换
  13. Kaldi的安装与测试
  14. Go官方的使用Gin开发Web服务教程 | Gopher Daily (2021.08.19) ʕ◔ϖ◔ʔ
  15. 黑苹果电源键睡眠关机的分析及解决办法
  16. 硬实时RTLinux安装配置详解 (一):准备工作
  17. VBA 连接Oracle 数据库
  18. 【Ubuntu】Ubuntu16.04的主题和终端美化
  19. 谷歌浏览器无法翻译中文解决办法
  20. Ae和Pr有什么不一样

热门文章

  1. 如何列出mongo shell中的所有集合?
  2. win11怎么解除网络限制 windows11解除网络限制的设置方法
  3. servlet实现mvc
  4. spring mvc后端代码实现弹出对话框_伟源|一图搞定Spring框架
  5. Android:复杂listview条目
  6. dbf文件怎么创建_DBC文件到底是个啥
  7. JS判断手机浏览器是横屏or竖屏
  8. JavaScript:执行机制
  9. linux之添加python环境变量
  10. iphonex屏幕失灵乱跳_6plus触屏失灵时好时坏,屏幕乱闪乱跳