Article 59FDS Cannot compile Qt example program

Cannot compile Qt example program

by
dedec0
from LinuxQuestions.org on (#59FDS)
Hello, i am trying to compile a Qt project which came with it, and it gives an error. Can you help me fixing it?

Code:# make
g++ -c -pipe -Wall -W -O2 -D_REENTRANT -DQT_NO_DEBUG -DQT_THREAD_SUPPORT -I/usr/local/qt-x11-free-3.3.8/mkspecs/linux-g++ -I. -I../../include -I.moc/release-static-mt/ -o .obj/release-static-mt/application.o application.cpp
In file included from ../../include/qmap.h:46:0,
from ../../include/qmime.h:43,
from ../../include/qevent.h:45,
from ../../include/qobject.h:45,
from ../../include/qwidget.h:43,
from ../../include/qmainwindow.h:42,
from application.h:14,
from application.cpp:11:
../../include/qvaluelist.h:88:13: error: ptrdiff_t' does not name a type
typedef ptrdiff_t difference_type;
^~~~~~~~~
../../include/qvaluelist.h:164:13: error: ptrdiff_t' does not name a type
typedef ptrdiff_t difference_type;
^~~~~~~~~
In file included from ../../include/qmap.h:46:0,
from ../../include/qmime.h:43,
from ../../include/qevent.h:45,
from ../../include/qobject.h:45,
from ../../include/qwidget.h:43,
from ../../include/qmainwindow.h:42,
from application.h:14,
from application.cpp:11:
../../include/qvaluelist.h:424:13: error: ptrdiff_t' does not name a type
typedef ptrdiff_t difference_type;
^~~~~~~~~
In file included from ../../include/qmime.h:43:0,
from ../../include/qevent.h:45,
from ../../include/qobject.h:45,
from ../../include/qwidget.h:43,
from ../../include/qmainwindow.h:42,
from application.h:14,
from application.cpp:11:
../../include/qmap.h:107:13: error: ptrdiff_t' does not name a type
typedef ptrdiff_t difference_type;
^~~~~~~~~
../../include/qmap.h:223:13: error: ptrdiff_t' does not name a type
typedef ptrdiff_t difference_type;
^~~~~~~~~
In file included from ../../include/qmime.h:43:0,
from ../../include/qevent.h:45,
from ../../include/qobject.h:45,
from ../../include/qwidget.h:43,
from ../../include/qmainwindow.h:42,
from application.h:14,
from application.cpp:11:
../../include/qmap.h:604:13: error: ptrdiff_t' does not name a type
typedef ptrdiff_t difference_type;
^~~~~~~~~
In file included from application.cpp:13:0:
../../include/qimage.h: In member function bool QImageTextKeyLang::operator<(const QImageTextKeyLang&) const':
../../include/qimage.h:58:45: warning: suggest parentheses around &&' within ||' [-Wparentheses]
{ return key < other.key || key==other.key && lang < other.lang; }
~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
Makefile:226: recipe for target '.obj/release-static-mt/application.o' failed
make: *** [.obj/release-static-mt/application.o] Error 1
#latest?d=yIl2AUoC8zA latest?i=HViycQrqDrY:Vd10mX7yKdE:F7zBnMy latest?i=HViycQrqDrY:Vd10mX7yKdE:V_sGLiP latest?d=qj6IDK7rITs latest?i=HViycQrqDrY:Vd10mX7yKdE:gIN9vFwHViycQrqDrY
External Content
Source RSS or Atom Feed
Feed Location https://feeds.feedburner.com/linuxquestions/latest
Feed Title LinuxQuestions.org
Feed Link https://www.linuxquestions.org/questions/
Reply 0 comments