Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. [Updated with minimal reproducing example] Mac OS X 10.9: can't compile a project with Qt 5.2 beta
Qt 6.11 is out! See what's new in the release blog

[Updated with minimal reproducing example] Mac OS X 10.9: can't compile a project with Qt 5.2 beta

Scheduled Pinned Locked Moved General and Desktop
4 Posts 2 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.
  • V Offline
    V Offline
    Violet Giraffe
    wrote on last edited by
    #1

    I'm trying to check Qt 5.2 to see if OS X 10.9-specific bugs have been fixed, but can't build my project. I have C++11 disabled (no CONFIG+=C++11), but I use some older C++0x features so I have -std=c++0x.

    The problem is that for some reason C++11-specific defines get defined somewhere (in the mkspec?), and since I don't have C++11 support it fails to compile. Any ideas on how to fix it without enabling C++11?

    1 Reply Last reply
    0
    • V Offline
      V Offline
      Violet Giraffe
      wrote on last edited by
      #2

      Actually, even with CONFIG+=C++11 and QMAKE_CXXFLAGS+=-std=c++11 I get a lot of weird errors (not with ‘initializer_list, though, that seems to have solved). Is mkspec broken in Qt 5.2 on 10.9?

      1 Reply Last reply
      0
      • V Offline
        V Offline
        Violet Giraffe
        wrote on last edited by
        #3

        Disregard my previous message, there might have been a mess with compiler flags. Let's return to the initial problem with initializer_list. Steps to reproduce:

        1. Install "Qt 5.2 beta for Mac OS X":http://download.qt-project.org/development_releases/qt/5.2/5.2.0-beta1/
        2. Create a new console application project with Qt Creator using Qt 5.2 kit.
        3. Add QMAKE_CXXFLAGS+=-std=c++0x to the project file. My project looks like this:

        @QT += core

        TARGET = Test
        CONFIG += console
        CONFIG -= app_bundle

        TEMPLATE = app

        QMAKE_CXXFLAGS+=-std=c++0x

        SOURCES += main.cpp
        @

        1. main.cpp:

        @#include <QList>

        int main(int, char *[])
        {
        return 0;
        }@

        1. Attempt to compile, it will fail. Output:

        @In file included from ../Test/main.cpp:1:
        In file included from ../Qt5.2.0/5.2.0-beta1/clang_64/lib/QtCore.framework/Versions/5/Headers/QList:1:
        ../Qt5.2.0/5.2.0-beta1/clang_64/lib/QtCore.framework/Versions/5/Headers/qlist.h:53:10: fatal error: 'initializer_list' file not found
        #include <initializer_list>
        ^
        1 error generated.@

        1 Reply Last reply
        0
        • A Offline
          A Offline
          AlexWMF
          wrote on last edited by
          #4

          I had some problem, it solved by adding
          @CONFIG += c++11@
          instead of
          @CONFIG += C++11@

          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