Results 1 to 3 of 3

Thread: [ Qt 5.6 ] Examples compilation error 'QCoreApplication'

  1. #1
    Join Date
    Apr 2016
    Posts
    1
    Qt products
    Qt/Embedded

    Default [ Qt 5.6 ] Examples compilation error 'QCoreApplication'

    Hello,
    While trying compile qt 5.6 examples for embedded platform I got this error message:

    mainwindow.cpp:180:14: error: 'QCoreApplication' has not been declared
    if (!QCoreApplication::arguments().contains(QStringLi teral("--no_render_alpha")))


    My configuration looks as following :

    Qt Code:
    1. ./configure -prefix /home/marek/TDIR \
    2. -extprefix /home/marek/INSTDIR \
    3. -hostprefix /home/marek/TOOLSDIR \
    4. -release \
    5. -qpa \
    6. -eglfs \
    7. -opengl es2 \
    8. -no-wayland \
    9. -no-accessibility \
    10. -device linux-imx53qsb-g++ -device-option CROSS_COMPILE=arm-guf-linux-gnueabi- -sysroot /projects/Amuse/guf.sdk/sysroots/armv7a-vfp-neon-guf-linux-gnueabi \
    11. -opensource -confirm-license \
    12. -make libs \
    13. -skip qtwebengine \
    14. -make examples \
    15. -no-cups -no-dbus -no-glib \
    16. -no-pch -no-nis -no-accessibility -no-gtkstyle \
    17. -no-xcb -v
    To copy to clipboard, switch view to plain text mode 

    Error contex you can find in an attachment

    Could please give me any hint what is missing ?
    Attached Files Attached Files

  2. #2
    Join Date
    Jan 2006
    Location
    Graz, Austria
    Posts
    8,416
    Thanks
    37
    Thanked 1,544 Times in 1,494 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: [ Qt 5.6 ] Examples compilation error 'QCoreApplication'

    The error sounds like you are missing the include for QCoreApplication in your mainwindow.cpp

    Cheers,
    _

  3. #3
    Join Date
    Dec 2015
    Posts
    14
    Qt products
    Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default Re: [ Qt 5.6 ] Examples compilation error 'QCoreApplication'

    Hi,

    Does your .pro file similar to this?

    ---------------------------------------------------------------
    QT += core gui
    greaterThan(QT_MAJOR_VERSION, 4): QT += widgets

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

    And main.cpp

    -------------------------------
    #include "mainwindow.h"
    #include <QApplication>
    #include <QTextCodec>
    #include <QWSServer>
    #include <unistd.h>
    -------------------------------

    Kind Regards

Similar Threads

  1. Replies: 0
    Last Post: 13th August 2015, 11:16
  2. Replies: 2
    Last Post: 23rd June 2014, 14:37
  3. Replies: 5
    Last Post: 10th April 2013, 13:35
  4. Error when compile/run Qt examples
    By babygal in forum Newbie
    Replies: 5
    Last Post: 9th March 2011, 12:51
  5. WinMain@16 compiler error in Qt examples
    By Tvt204 in forum Installation and Deployment
    Replies: 11
    Last Post: 26th January 2010, 20:30

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.