main.cpp:(.text.startup+0x22): undefined reference to `QApplication::QApplication(int&, char**, int)'

moc_CalculatorUI.o:(.data.rel.ro._ZTV12CalculatorUI[_ZTV12CalculatorUI]+0x1a0): undefined reference to `QWidget::inputMethodQuery(Qt::InputMethodQuery) const'
moc_CalculatorUI.o:(.data.rel.ro._ZTV12CalculatorUI[_ZTV12CalculatorUI]+0x1a8): undefined reference to `QWidget::focusNextPrevChild(bool)'
moc_CalculatorUI.o:(.data.rel.ro._ZTV12CalculatorUI[_ZTV12CalculatorUI]+0x1d0): undefined reference to `non-virtual thunk to QWidget::devType() const'
moc_CalculatorUI.o:(.data.rel.ro._ZTV12CalculatorUI[_ZTV12CalculatorUI]+0x1d8): undefined reference to `non-virtual thunk to QWidget::paintEngine() const'
moc_CalculatorUI.o:(.data.rel.ro._ZTV12CalculatorUI[_ZTV12CalculatorUI]+0x1e0): undefined reference to `non-virtual thunk to QWidget::metric(QPaintDevice::PaintDeviceMetric) const'
moc_CalculatorUI.o:(.data.rel.ro._ZTV12CalculatorUI[_ZTV12CalculatorUI]+0x1e8): undefined reference to `non-virtual thunk to QWidget::initPainter(QPainter*) const'
moc_CalculatorUI.o:(.data.rel.ro._ZTV12CalculatorUI[_ZTV12CalculatorUI]+0x1f0): undefined reference to `non-virtual thunk to QWidget::redirected(QPoint*) const'
moc_CalculatorUI.o:(.data.rel.ro._ZTV12CalculatorUI[_ZTV12CalculatorUI]+0x1f8): undefined reference to `non-virtual thunk to QWidget::sharedPainter() const'
moc_CalculatorUI.o:(.data.rel.ro+0x0): undefined reference to `QWidget::staticMetaObject'
collect2: error: ld returned 1 exit status
make: *** [Makefile:144: myCalculator] Error 1

在写Qt时候出现这种错误:解决方法   在.pro中加入

QT += core gui
QT += widgets

QT +=XXX

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]的更多相关文章

  1. ../../build/debug/codegen/libCodeGen.a(llvm-codegen.cc.o ):( data.rel.ro_ZTIN4llvm18ValueMapCallbackVHIPKNS_5ValueENS_6WeakVHENS_14ValueMapConfigIS3_EEEE[_ZTIN4llvm18ValueMapCallbackVHIPKNS_5ValueENS_

    解决方式如下: wget http://llvm.org/releases/3.3/llvm-3.3.src.tar.gz    tar xvzf llvm-3.2.src.tar.gz    cd ...

  2. gearman安装及初次使用

    官网:  http://gearman.org/ 一篇文章: 利用Gearman实现异步任务处理 一.问题分析 问题:在性能测试过程中,发现用户管理平台在进行图片上传时,性能不佳. 分析:经过代码分析 ...

  3. Summary on deep learning framework --- PyTorch

    Summary on deep learning framework --- PyTorch  Updated on 2018-07-22 21:25:42  import osos.environ[ ...

  4. install opencv

    OpenCV是一个基于开源发行的跨平台计算机视觉库,它轻量级而且高效——由一系列 C 函数和少量 C++ 类构成,同时提供了Python.Ruby.MATLAB等语言的接口,实现了图像处理和计算机视觉 ...

  5. CentOS7安装Oracle 11gR2 图文详解

    注:Oracle11gR2 X64安装 一.环境准备 安装包: 1.VMware-workstation-full-11.1.0-2496824.exe 2.CentOS-7-x86_64-DVD-1 ...

  6. CSAPP-Lab04 Architecture Lab 深入解析

    穷且益坚,不坠青云之志. 实验概览 Arch Lab 实验分为三部分.在 A 部分中,需要我们写一些简单的Y86-64程序,从而熟悉Y86-64工具的使用:在 B 部分中,我们要用一个新的指令来扩展S ...

  7. (转)__attribute__之section 分析详解

    原文地址:__attribute__之section详解 前言 第一次接触 "section" 是在公司的一个STM32的项目代码中,前工程师将所有的初始化函数都使用的" ...

  8. 六星经典CSAPP-笔记(7)加载与链接(上)

    六星经典CSAPP-笔记(7)加载与链接 1.对象文件(Object File) 1.1 文件类型 对象文件有三种形式: 可重定位对象文件(Relocatable object file):包含二进制 ...

  9. 【CSAPP】Architecture Lab 实验笔记

    archlab属于第四章的内容.这章讲了处理器体系结构,就CPU是怎样构成的.看到时候跃跃欲试,以为最后实验是真要去造个CPU,配套资料也是一如既往的豪华,合计四十多页的参考手册,一大包的源码和测试程 ...

随机推荐

  1. 微信小程序 API 基础

    其实还有一些组件,没有提,因为那些组件跟 API 的功能差不多,API 可能比他会更好一点: 具体可见官方文档 基础: 判断接口是否可用:wx.canIUse(a) a 代表:接口名字 返回值:布尔 ...

  2. MyBaits动态sql语句

    1 在接口中书写方法 public interface EmployeeMapperDynamicSQL { public List<Employee> getEmpsTestInnerP ...

  3. 十八、RF中selenium2library构造函数中参数解释

    def __init__(self,                  timeout=5.0,                  implicit_wait=0.0,                 ...

  4. 求旋转数组的最小数字(剑指offer)

    把一个数组最开始的若干个元素搬到数组的末尾,我们称之为数组的旋转. 输入一个非递减排序的数组的一个旋转,输出旋转数组的最小元素. 例如数组{3,4,5,1,2}为{1,2,3,4,5}的一个旋转,该数 ...

  5. HAProxy、Keepalived 在 Ocatvia 的应用实现与分析

    目录 文章目录 目录 Amphora 启动 keepalived 启动 haproxy 最后 Amphora 创建一个 loadbalancer 需要占用一到两台 Amphora Instance 作 ...

  6. vue-loader分析

    分析一下Vue2.0中的vue-loader是如何处理.vue单文件组件的: 1.vueLoaderplugin 作用是 找到.vue,.vue.html的rules然后在他们的rule里添加 pit ...

  7. postgresql 10.5 主从复制--搭建测试

    env: role master slave host pg1 pg2 ip 11 12 pg-version 10.5 10.5 1 初始化查看 [ceiec@localhost ~]$ df -h ...

  8. eslint+prettier 的 VSCode配置项

    { "files.autoSave": "off", "editor.fontSize": 12, "terminal.integ ...

  9. 实用网站推荐——office模板(PPT)

    今天给大家分享一批Office的模板网站! office模板比较多的是PPT模板,做PPT是一件非常痛苦的事,自己做的要么太丑,要么搭配太单一,所以今天给大家分享一批网站,再也不用愁做PPT了. wo ...

  10. laravel框架源码分析(一)自动加载

    一.前言 使用php已有好几年,laravel的使用也是有好长时间,但是一直对于框架源码的理解不深,原因很多,归根到底还是php基础不扎实,所以源码看起来也比较吃力.最近有时间,所以开启第5.6遍的框 ...