Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Installation and Deployment
  4. Qt and gcc 4.7.0 -> Parse error at "std" problem
Forum Updated to NodeBB v4.3 + New Features

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

Scheduled Pinned Locked Moved Installation and Deployment
8 Posts 3 Posters 8.7k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • Q Offline
    Q Offline
    QuornJulio
    wrote on 24 Oct 2012, 09:51 last edited by
    #1

    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.

    1 Reply Last reply
    0
    • Q Offline
      Q Offline
      QuornJulio
      wrote on 24 Oct 2012, 15:55 last edited by
      #2

      hello,

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

      1 Reply Last reply
      0
      • S Offline
        S Offline
        sierdzio
        Moderators
        wrote on 24 Oct 2012, 16:00 last edited by
        #3

        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..

        (Z(:^

        1 Reply Last reply
        0
        • Q Offline
          Q Offline
          QuornJulio
          wrote on 25 Oct 2012, 19:31 last edited by
          #4

          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.

          1 Reply Last reply
          0
          • Q Offline
            Q Offline
            QuornJulio
            wrote on 29 Oct 2012, 15:40 last edited by
            #5

            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!

            1 Reply Last reply
            0
            • M Offline
              M Offline
              mlong
              wrote on 29 Oct 2012, 15:55 last edited by
              #6

              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.

              Software Engineer
              My views and opinions do not necessarily reflect those of anyone -- living or dead, real or fictional -- in this universe or any other similar multiverse node. Void where prohibited. Your mileage may vary. Caveat emptor.

              1 Reply Last reply
              0
              • Q Offline
                Q Offline
                QuornJulio
                wrote on 2 Nov 2012, 20:21 last edited by
                #7

                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)

                1 Reply Last reply
                0
                • Q Offline
                  Q Offline
                  QuornJulio
                  wrote on 3 Nov 2012, 14:40 last edited by
                  #8

                  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!

                  1 Reply Last reply
                  0

                  1/8

                  24 Oct 2012, 09:51

                  • Login

                  • Login or register to search.
                  1 out of 8
                  • First post
                    1/8
                    Last post
                  0
                  • Categories
                  • Recent
                  • Tags
                  • Popular
                  • Users
                  • Groups
                  • Search
                  • Get Qt Extensions
                  • Unsolved