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[])
{
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.
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[])
{
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.
Comment