Announcement

Collapse
No announcement yet.

error when compiling with qmake and make

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    error when compiling with qmake and make

    hei
    I am trying a simple helloworld program to test qt4, and it seems like I have wrong library files or something

    Here's the program I try to compile:

    ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
    ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
    **
    ************************************************** **************************/

    #include <QApplication>
    #include <QPushButton>

    int main(int argc, char *argv&#91;])
    {
    QApplication app(argc, argv);

    QPushButton hello("Hello world!");
    hello.resize(100, 30);

    hello.show();
    return app.exec();
    }

    And here's the last lines of the result of the compiling:

    In file included from /usr/include/qt4/QtGui/qpolygon.h:47,
    from /usr/include/qt4/QtGui/qmatrix.h:47,
    from /usr/include/qt4/QtGui/qtransform.h:46,
    from /usr/include/qt4/QtGui/qimage.h:47,
    from /usr/include/qt4/QtGui/qpixmap.h:51,
    from /usr/include/qt4/QtGui/qicon.h:49,
    from /usr/include/qt4/QtGui/qabstractbutton.h:47,
    from /usr/include/qt4/QtGui/qpushbutton.h:47,
    from /usr/include/qt4/QtGui/QPushButton:1,
    from main.cpp:7:
    /usr/include/qt4/QtCore/qvector.h: At global scope:
    /usr/include/qt4/QtCore/qvector.h:253: error: ‘ptrdiff_t’ does not name a type
    make: *** [main.o] Error 1

    As usual I use qmake -project
    then qmake
    and then make.

    It did work in other distros.

    #2
    Re: error when compiling with qmake and make

    Looks to me like qt 4 is not installed correctly. How did you install it?
    You may have more luck with this question in qt related forums like http://www.qtcentre.org/forum/ Good help there.
    Good luck.
    Greetings from Groningen Netherlands

    Comment

    Working...
    X