Error: ‘ptrdiff_t’ does not name a type



  • Dear Sir

    I have tried to install qt-x11-free-3.3.6 on the new Ubuntu OS (12.04 LTS) (gcc (Ubuntu/Linaro 4.6.3-1ubuntu5) 4.6.3).
    The configuration went well but when I tried to run "make" I got the following error message:
    ....
    ....
    ../include/qvaluelist.h:88:13: error: ‘ptrdiff_t’ does not name a type
    ../include/qvaluelist.h:164:13: error: ‘ptrdiff_t’ does not name a type
    ....
    ....

    ../include/qmap.h:107:13: error: ‘ptrdiff_t’ does not name a type
    ../include/qmap.h:223:13: error: ‘ptrdiff_t’ does not name a type
    .....

    make[2]: *** [.obj/release-shared/qapplication_x11.o] Error 1
    make[2]: Leaving directory /usr/local/qt/src' make[1]: *** [sub-src] Error 2 make[1]: Leaving directory/usr/local/qt'
    make: *** [init] Error 2

    Kind regards
    Yacob



  • It's a common error with relative new libc and... Just add
    @#include <stddef.h>@
    to files on which does the compiler complains. You may have also troubles with png plugin if you have selected --system-libpng and you have 1,5* libpng... where is an patch on the web... for example "here":http://www.linuxfromscratch.org/patches/downloads/qt/



  • Dear AcerExtensa

    Thank you for your quck reply. Now I could able to pass the first hurdle after including "#include <stddef.h>". I have now some problems with finding "Xext"

    r/X11R6/lib -lXext -lX11 -lm -ldl
    /usr/bin/ld: cannot find -lXext
    collect2: ld returned 1 exit status

    Kind regards
    Yacob



  • install libxext-dev with aptitude


Log in to reply
 

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