Qt and gcc 4.7.0 -> Parse error at "std" problem



  • i've compiled qt and use the following to configure:
    configure.exe -confirm-license -opensource -static -stl -rtti -exceptions -arch windows
    -platform win32-g++ -debug-and-release -no-qt3support -no-phonon-backend -no-webkit -no-script -no-scripttools

    and now can not compile qt-apps. i use the actual mingw (32bit) with gcc 4.7.0.
    compilation ends with:
    C:/Development/MinGW/lib/gcc/mingw32/4.7.0/include/c++/bits/stl_relops.:68: Parse error at "std"

    what is the reason for that error?
    i am thankfull for some hints.
    please help!

    thx.



  • hello,

    no one knows this error or has an idea!?
    that's poor.


  • Moderators

    Only think that comes to mind is to drop the -stl flag from configure. I have not run into that one, though, and on those rare occasions I compile for Windows, I use MSVC, so I certainly do lack knowledge here..



  • hello,

    i found out that building 'pure' qt-app (without stl) is possible.
    but when i want to use stl, add the following entries to the .pro-file like:

    INCLUDEPATH += C:/Development/MinGW/include
    C:/Development/MinGW/lib/gcc/mingw32/4.7.0/include
    C:/Development/MinGW/lib/gcc/mingw32/4.7.0/include/c++
    C:/Development/MinGW/lib/gcc/mingw32/4.7.0/include/c++/backward
    C:/Development/MinGW/lib/gcc/mingw32/4.7.0/include/c++/mingw32
    C:/Development/MinGW/lib/gcc/mingw32/4.7.0/include-fixed

    and include e.g. <string> (std::string) in a simple class,
    compilation ends with the error.

    also searching with google revealed that this error is not a common
    one and i did not find a solution for it.



  • hello,

    in the project .pro-file you need to add -I and -L for includes and libs.
    when i remove all the -I and -L, i get the "Parse error at std"
    found by trial!

    @CONFIG += debug
    TEMPLATE = app
    TARGET = QtApplication
    DEPENDPATH += .
    QT += core gui
    HEADERS += qttest.h
    SOURCES += main.cpp qttest.cpp
    INCLUDEPATH += -IC:/Development/MinGW/include
    -IC:/Development/MinGW/lib/gcc/mingw32/4.7.0/include
    -IC:/Development/MinGW/lib/gcc/mingw32/4.7.0/include/c++
    -IC:/Development/MinGW/lib/gcc/mingw32/4.7.0/include/c++/backward
    -IC:/Development/MinGW/lib/gcc/mingw32/4.7.0/include/c++/mingw32
    -IC:/Development/MinGW/lib/gcc/mingw32/4.7.0/include-fixed
    LIBS += -LC:/Development/MinGW/lib
    FORMS += qttest.ui
    RESOURCES += @

    thanks to all who have read this post and did not have any idea!


  • Moderators

    Sorry that you didn't get more helpful replies! Obviously nobody had a solid answer to give, or they would have, I'm sure. Hopefully your posted solution can help others who might run into the same problem at some point.



  • hello,

    after editing the .pro-file like above i found include-entries in the Makefile.Debug like this

    @-I'-IC:/Development/MinGW/include'@

    how can i avoid this?

    also can not remove all -I in .pro-file cause of the above error.

    (i use eclipse)



  • hello,

    try to compile qt 4.8.3 with (latest mingw) gcc 4.7.0 on windows 7 and the following configuration:

    @configure.exe -confirm-license -opensource -platform win32-g++-4.6 -arch windows -qt-style-windowsxp -qt-style-windowsvista -debug-and-release -no-qt3support -no-phonon-backend -no-webkit -no-script -no-scripttools -no-dsp -no-vcproj -no-audio-backend -no-declarative -no-mp -no-s60 -nomake demos -nomake examples
    -L C:/Development/MinGW/lib
    -I C:/Development/MinGW/include
    -I C:/Development/MinGW/lib/gcc/mingw32/4.7.0/include
    -I C:/Development/MinGW/lib/gcc/mingw32/4.7.0/include/c++
    -I C:/Development/MinGW/lib/gcc/mingw32/4.7.0/include/c++/backward
    -I C:/Development/MinGW/lib/gcc/mingw32/4.7.0/include/c++/mingw32
    -I C:/Development/MinGW/lib/gcc/mingw32/4.7.0/include-fixed
    @

    ends with:
    !http://img593.imageshack.us/img593/7788/screenshotxzw.jpg(Screenshot)!

    someone who has this problem too?
    once again -> "Parse error at std"
    what i am doing wrong?

    nice greetings to DIGIA!


Log in to reply
 

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