zoukankan      html  css  js  c++  java
  • 【学QT】 3


    1、 

    [root@localhost helloqt]# make
    g++ -Wl,-rpath,/usr/local/qt/lib -o cfconv .obj/main.o .obj/cfconvmainform.o .obj/moc_cfconvmainform.o   -L/usr/local/qt/lib -L/usr/X11R6/lib -lqt-mt -lXext -lX11 -lm
    .obj/moc_cfconvmainform.o:(.rodata._ZTV14cfconvMainform[vtable for cfconvMainform]+0x11c): undefined reference to `QWidget::graphicsContext(bool) const'
    .obj/moc_cfconvmainform.o:(.rodata._ZTV14cfconvMainform[vtable for cfconvMainform]+0x188): undefined reference to `QWidget::qwsEvent(QWSEvent*)'
    .obj/moc_cfconvmainform.o:(.rodata._ZTV14cfconvMainform[vtable for cfconvMainform]+0x18c): undefined reference to `QWidget::scanLine(int) const'
    .obj/moc_cfconvmainform.o:(.rodata._ZTV14cfconvMainform[vtable for cfconvMainform]+0x190): undefined reference to `QWidget::bytesPerLine() const'
    .obj/moc_cfconvmainform.o:(.rodata._ZTV14cfconvMainform[vtable for cfconvMainform]+0x1fc): undefined reference to `non-virtual thunk to QWidget::scanLine(int) const'
    .obj/moc_cfconvmainform.o:(.rodata._ZTV14cfconvMainform[vtable for cfconvMainform]+0x200): undefined reference to `non-virtual thunk to QWidget::bytesPerLine() const'
    .obj/moc_cfconvmainform.o:(.rodata._ZTV14cfconvMainform[vtable for cfconvMainform]+0x204): undefined reference to `non-virtual thunk to QWidget::graphicsContext(bool) const'
    collect2: ld 返回 1
    make: *** [cfconv] 错误 1

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

    DEBUG:

    原因在于 之前 在配置错误情况下生产的 .obj 文件依旧存在, 再次make 时出错, 删除  编译产生的文件即可。

    rm -rf   `ls -a  ./ | egrep -v "(.cpp$|.h$|.ui$|.pro$)"`

    ====================================================================================================================






  • 相关阅读:
    &【12】Python 函数
    &【11】Python 流程控制
    &【09】Python 数据类型之dictionary
    &【07】Python 数据类型之元组
    &【08】Python 数据类型之set
    &【06】Python 数据类型之list
    &【05】Python 彻底搞懂分片操作
    &【04】Python 数据结构之序列
    SpringBoot-HelloWorld(三)
    SpringBoot-了解微服务(二)
  • 原文地址:https://www.cnblogs.com/roger0212/p/4436670.html
Copyright © 2011-2022 走看看