Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Update: Forum Guidelines & Code of Conduct

    error: identifier "ApplicationFlags" is undefined

    General and Desktop
    2
    2
    590
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • puneet336
      puneet336 last edited by puneet336

      Hi all,
      I am trying to compile an application using Qt-4.8.7 environment module on RHEL 6.6 and i am getting following error(But if i use the Qt installed at the default system paths, the compilation is success.) :-

      CXX      gvedit-main.o
      In file included from /home/apps/QT/4.8.7/gnu/include/QtGui/QApplication(1),
                      from main.cpp(22):
      /home/apps/QT/4.8.7/gnu/include/QtGui/qapplication.h(130): error: identifier "ApplicationFlags" is undefined
           QApplication(int &argc, char **argv, int = ApplicationFlags);
                                                      ^
      
      In file included from /home/apps/QT/4.8.7/gnu/include/QtGui/QApplication(1),
                      from main.cpp(22):
      /home/apps/QT/4.8.7/gnu/include/QtGui/qapplication.h(131): error: identifier "ApplicationFlags" is undefined
           QApplication(int &argc, char **argv, bool GUIenabled, int = ApplicationFlags);
                                                                       ^
      
      In file included from /home/apps/QT/4.8.7/gnu/include/QtGui/QApplication(1),
                      from main.cpp(22):
      /home/apps/QT/4.8.7/gnu/include/QtGui/qapplication.h(132): error: identifier "ApplicationFlags" is undefined
           QApplication(int &argc, char **argv, Type, int = ApplicationFlags);
                                                            ^
      
      In file included from /home/apps/QT/4.8.7/gnu/include/QtGui/QApplication(1),
                      from main.cpp(22):
      /home/apps/QT/4.8.7/gnu/include/QtGui/qapplication.h(134): error: identifier "ApplicationFlags" is undefined
           QApplication(Display* dpy, Qt::HANDLE visual = 0, Qt::HANDLE cmap = 0, int = ApplicationFlags);
                                                                                        ^
      
      In file included from /home/apps/QT/4.8.7/gnu/include/QtGui/QApplication(1),
                      from main.cpp(22):
      /home/apps/QT/4.8.7/gnu/include/QtGui/qapplication.h(135): error: identifier "ApplicationFlags" is undefined
      
           QApplication(Display *dpy, int &argc, char **argv, Qt::HANDLE visual = 0, Qt::HANDLE cmap= 0, int = ApplicationFlags);
                                                                                                               ^
      compilation aborted for main.cpp (code 2)
      

      Any help/hint would be very useful.
      Eagerly awaiting your replies.

      jsulm 1 Reply Last reply Reply Quote 0
      • jsulm
        jsulm Lifetime Qt Champion @puneet336 last edited by jsulm

        @puneet336 Can you show your main.cpp?

        https://forum.qt.io/topic/113070/qt-code-of-conduct

        1 Reply Last reply Reply Quote 1
        • First post
          Last post