Error when compiling a Marble example app.



  • Hi guys, I am using OpenSuse Leap and trying to compile an small aplication using marble. Of course this application uses QT to run and the headers are:

    #include <QtGui/QApplication>
    #include <marble/MarbleWidget.h>

    after compiling it with the next instructions :

    g++ -I /usr/include/qt4/ -I /usr/include/qt4/QtGui -I /usr/include/qt4/QtCore -o my_marble my_marble.cpp -lmarblewidget -lQtGui -lQtCore

    I get the next error:

    /usr/include/marble/MarbleWidget.h:23:19: fatal error: QPixmap: No such file or directory
    #include <QPixmap>

    I am not an expert on this things but I think it means that he cannot find the QPixmap library on the default path. After going a little bit around the libraries I found the reference to QPixmap on MarbleWidget.h.

    #include <QPixmap>

    Then again I supose the path must be a default one to find QPixmap on a certain place at my file system. Searching around a little bit I was able to found the QPixmap library on usr/include/Qt/QPixmap.h but because is called without the .h at the end I supose is not a library. Also I am unable to find any QPixmap using which command.

    My question is then, what should I do to solve this?. I know I need to give the correct path to the file, but there is not QPixmap file, there is only a qpixmap.h at usr/include/QT. Also from the compiling line I do no posses any directory called qt4 and the files QTGui and QTcore are located on usr/include/QT and not usr/include/qt4.

    using qmake -v I found that I am using QT version 4.8.6 in /usr/lib64 , after searching I found the qt4 directory but still no QPixmap. Could be something is lost in my system?.

    Thanks for any help, I keep searching :3


  • Lifetime Qt Champion

    Hi and welcome to devnet,

    Why not make a Qt project with your current project ? That would simplify things a lot for you. Also, check against which version of Qt was Marble compiled.


Log in to reply
 

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