error: identifier "ApplicationFlags" is undefined



  • 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.


  • Moderators

    @puneet336 Can you show your main.cpp?


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.