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. How to enable C++0x on QtSDK with MinGw Compiler?
Forum Updated to NodeBB v4.3 + New Features

How to enable C++0x on QtSDK with MinGw Compiler?

Scheduled Pinned Locked Moved Installation and Deployment
6 Posts 4 Posters 2.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.
  • C Offline
    C Offline
    curiosul
    wrote on last edited by
    #1

    I'm trying to use <regex> on Qt creator but when I include header file or try to use some regex functions i get this message:
    @
    *#error This file requires compiler and library support for the upcoming ISO C++ standard, C++0x. This supports currently experimental, and must be enabled with the -std=c++0x or -std=gnu++0x compiler options. *@

    I've tried many methods found on internet buy these methods causes other errors.

    For example in Code::Blocks is can be easily solved and i think there can be solved too. But how to enable -std=gnu++0x corectly?

    Cea mai buna batalie este cea castigata fara lupta.

    1 Reply Last reply
    0
    • JKSHJ Offline
      JKSHJ Offline
      JKSH
      Moderators
      wrote on last edited by
      #2

      Hi,

      Please list the methods that you've already tried. Otherwise, the answers you receive might ask you to repeat what you've already done. It's also useful to say which version of Qt and MinGW you're using.

      Anyway, see http://qt-project.org/forums/viewthread/20105 or http://qt-project.org/forums/viewthread/13710

      Qt Doc Search for browsers: forum.qt.io/topic/35616/web-browser-extension-for-improved-doc-searches

      1 Reply Last reply
      0
      • C Offline
        C Offline
        curiosul
        wrote on last edited by
        #3

        I'm blocked at exactly here:

        @

        I tried

        @QMAKE_CXXFLAGS += -std=c++0x@
        

        and also tried

        @QMAKE_CXXFLAGS += -std=gnu++0x@
        

        in my projects, with the Qt 4.8.0 and Qt 4.8.1 on Windows 7 (64-bit). Both were using mingw4.4.

        I get segmentation faults during the compile.
        @

        I have QtSDK installed and i think i should update mingw but I don't know how to do it.

        Cea mai buna batalie este cea castigata fara lupta.

        1 Reply Last reply
        0
        • JKSHJ Offline
          JKSHJ Offline
          JKSH
          Moderators
          wrote on last edited by
          #4

          Hi,

          MinGW/GCC 4.4 is really old, and people have reported that C++0x support is buggy (http://stackoverflow.com/questions/1414897/using-gccs-c0x-mode-in-production ) Since the segfault happens during compilation, I'd conclude that the problem lies within the compiler.

          The old Qt SDK was provided by Nokia and is no longer maintained. Do you need Nokia-specific features? If not, a maintainer of the MinGW-builds project has kindly provided a new SDK for Qt 4.8 + MinGW 4.7/4.8 at http://sourceforge.net/projects/mingwbuilds/files/external-binary-packages/Qt-Builds/ You can uninstall your current Qt SDK and install one of them instead.

          Qt Doc Search for browsers: forum.qt.io/topic/35616/web-browser-extension-for-improved-doc-searches

          1 Reply Last reply
          0
          • C Offline
            C Offline
            curi0sul
            wrote on last edited by
            #5

            And could you help me to know which one to choose from the list that you give me? I've downloaded x64-Qt-5.1.1+qtcreator-2.8.1-(gcc-4.8.1-seh-rev5) and i think it is the source and I don't know how to compile it. Is there any binary installer of this updated sdk? Or, how to compile it?

            Thanks again.

            Learn How to fix Anything -> http://howtofix.pro

            1 Reply Last reply
            0
            • SGaistS Offline
              SGaistS Offline
              SGaist
              Lifetime Qt Champion
              wrote on last edited by
              #6

              Hi and welcome to devnet,

              If you want the MinGW sdk download "this one":http://download.qt-project.org/official_releases/qt/5.1/5.1.1/qt-windows-opensource-5.1.1-mingw48_opengl-x86-offline.exe

              Interested in AI ? www.idiap.ch
              Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

              1 Reply Last reply
              0

              • Login

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