Build Qt 4.7.4 on Linux shows qlist.h:54:15: error: new: No such file or directory



  • Hi guys,

    I'm trying to build Qt 4.7.4 on a SLES Linux platform, this is the command I'm using:

    ./configure -prefix /opt/qt4.7.4 -I/usr/include/c++/4.6 -qt-sql-sqlite -xmlpatterns -svg -webkit -script -declarative -opengl

    And this is the error I see when executing the command:

    Creating qmake. Please wait...
    g++ -c -o project.o -pipe -I. -Igenerators -Igenerators/unix -Igenerators/win32 -Igenerators/mac -Igenerators/symbian -I/home/mb/Downloads/qt-everywhere-opensource-src-4.7.4/include -I/home/mb/Downloads/qt-everywhere-opensource-src-4.7.4/include/QtCore -I/home/mb/Downloads/qt-everywhere-opensource-src-4.7.4/src/corelib/global -I/home/mb/Downloads/qt-everywhere-opensource-src-4.7.4/src/corelib/xml -I/home/mb/Downloads/qt-everywhere-opensource-src-4.7.4/tools/shared -DQT_NO_PCRE -DQT_BUILD_QMAKE -DQT_BOOTSTRAPPED -DQLIBRARYINFO_EPOCROOT -DQT_NO_TEXTCODEC -DQT_NO_UNICODETABLES -DQT_NO_COMPONENT -DQT_NO_STL -DQT_NO_COMPRESS -I/home/mb/Downloads/qt-everywhere-opensource-src-4.7.4/mkspecs/linux-g++ -DHAVE_QCONFIG_CPP -DQT_NO_THREAD -DQT_NO_QOBJECT -DQT_NO_GEOM_VARIANT project.cpp
    In file included from /home/mb/Downloads/qt-everywhere-opensource-src-4.7.4/include/QtCore/qlist.h:1,
    from /home/mb/Downloads/qt-everywhere-opensource-src-4.7.4/include/QtCore/../../src/corelib/tools/qstringlist.h:47,
    from /home/mb/Downloads/qt-everywhere-opensource-src-4.7.4/include/QtCore/qstringlist.h:1,
    from project.h:45,
    from project.cpp:42:
    /home/mb/Downloads/qt-everywhere-opensource-src-4.7.4/include/QtCore/../../src/corelib/tools/qlist.h:54:15: error: new: No such file or directory
    /home/mb/Downloads/qt-everywhere-opensource-src-4.7.4/include/QtCore/../../src/corelib/tools/qlist.h: In member function \u2018void QList<T>::node_construct(QList<T>::Node*, const T&) [with T = QString]\u2019:
    ...

    I know that the problems is that it can not find 'new' which is on /usr/include/c++/4.6 and as you can see I've tried to configure it using -I, but that doesn't seem to be the way.

    Do you guys know what else could I try? What am I doing wrong?

    Than you very much in advance.



  • I am not sure if it makes a difference but is there not supposed to be a space between the -I and the path?



  • Hi, thank you for you answer!!

    Actually I've already sorted out. It was my mistake, I had several versions of gcc, the gcc executable was from 4.6 while the include files were 4.3. I just had to change a symbolic link to point to the correct include files.

    Sorry I didn't post it earlier.


Log in to reply
 

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