Results 1 to 10 of 10

Thread: strange error in compilation

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Apr 2006
    Posts
    122
    Thanks
    18
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11

    Default strange error in compilation

    i am having strange error in compilation. I am presenting some part of my header file and output on terminal
    Qt Code:
    1. #ifndef vA_H
    2. #define vA_H
    3.  
    4. //QT4 includes
    5. #include <QObject>
    6.  
    7. //QGIS includes
    8. #include <qgisapp.h>
    9. #include <qgsmaptool.h>
    10. #include <qgsmapcanvas.h>
    11. #include<qgspoint.h>
    12. #include "../qgisplugin.h"
    13. #include<QToolBar>
    14. //#include "vARubberBand.h"
    15.  
    16. //forward declarations
    17.  
    18. //class QToolBar;
    19. class vARubberBand;
    20. /**
    21. * \class Plugin
    22. * \brief [name] plugin for QGIS
    23. * [description]
    24. */
    25. class vA1:public QgsMapTool , public QgisPlugin
    26. {
    27. Q_OBJECT;
    28. public:
    29. vA1(QgisApp * theApplication, QgisIface * theInterface);
    30. //! Destructor
    31. virtual ~vA1();
    32.  
    33. //! inherited from QgsMapTool
    To copy to clipboard, switch view to plain text mode 

    part of output is
    g++ -DHAVE_CONFIG_H -I. -I. -I../../.. -g -O2 -DQT3_SUPPORT -I/usr/local/Trolltech/Qt-4.1.2//mkspecs/default -I/usr/local/Trolltech/Qt-4.1.2//include/Qt3Support -I/usr/local/Trolltech/Qt-4.1.2//include/QtCore -I/usr/local/Trolltech/Qt-4.1.2//include/QtDesigner -I/usr/local/Trolltech/Qt-4.1.2//include/QtGui -I/usr/local/Trolltech/Qt-4.1.2//include/QtNetwork -I/usr/local/Trolltech/Qt-4.1.2//include/QtOpenGL -I/usr/local/Trolltech/Qt-4.1.2//include/QtSql -I/usr/local/Trolltech/Qt-4.1.2//include/QtXml -I/usr/local/Trolltech/Qt-4.1.2//include -I/usr/local/Trolltech/Qt-4.1.2//include/QtSvg -I/usr/local/Trolltech/Qt-4.1.2//include/QtTest -I/usr/local/Trolltech/Qt-4.1.2//include/QtDesigner -D_REENTRANT -DQT_THREAD_SUPPORT -DNO_DEBUG -I/usr/local/include -I/usr/include -I../../core -I../../ui -I../../gui -I../../raster -g -O2 -MT libqgis_plugin_va_la-va.lo -MD -MP -MF .deps/libqgis_plugin_va_la-va.Tpo -c va.cpp -fPIC -DPIC -o .libs/libqgis_plugin_va_la-va.o
    /usr/local/Trolltech/Qt-4.1.2//include/QtGui/qmenubar.h:29: error: expected initializer before 'QtGuiModule'
    va.cpp: In member function 'virtual void vA1::initGui()':
    va.cpp:98: error: no matching function for call to 'QAction::QAction(QIcon, const char [4], vA1* const)'
    /usr/local/Trolltech/Qt-4.1.2//include/QtGui/qaction.h:173: note: candidates are: QAction::QAction(const QAction&)
    /usr/local/Trolltech/Qt-4.1.2//include/QtGui/qaction.h:73: note: QAction::QAction(const QIcon&, const QString&, const QKeySequence&, QObject*, const char*)
    /usr/local/Trolltech/Qt-4.1.2//include/QtGui/qaction.h:70: note: QAction::QAction(const QString&, const QKeySequence&, QObject*, const char*)
    /usr/local/Trolltech/Qt-4.1.2//include/QtGui/qaction.h:68: note: QAction::QAction(QObject*, const char*)
    /usr/local/Trolltech/Qt-4.1.2//include/QtGui/qaction.h:65: note: QAction::QAction(const QIcon&, const QString&, QObject*)
    /usr/local/Trolltech/Qt-4.1.2//include/QtGui/qaction.h:64: note: QAction::QAction(const QString&, QObject*)
    /usr/local/Trolltech/Qt-4.1.2//include/QtGui/qaction.h:63: note: QAction::QAction(QObject*)
    This code is part of a os project so i will not be in a position to post all code. But what i have figured out is it has got something to do with inclusion of some header files.

    Similar code is working fine but i am caught here.

    regards
    quickNitin
    Last edited by jacek; 30th August 2006 at 11:37. Reason: changed [ code ] to [ quote ] to allow wrapping

Similar Threads

  1. very strange behaviour
    By regix in forum Qt Programming
    Replies: 23
    Last Post: 20th July 2006, 17:38
  2. [Win32/VC++ 8.0] Strange problems with qrc_*.cpp files
    By mloskot in forum Installation and Deployment
    Replies: 6
    Last Post: 6th March 2006, 10:28

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
  •  
Qt is a trademark of The Qt Company.