Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-38330

C++11 compiler flags are not set when generating objective-c++ precompiled headers

    XMLWordPrintable

Details

    • Bug
    • Resolution: Duplicate
    • Not Evaluated
    • None
    • 5.3.0 Beta1
    • Build tools: qmake
    • None

    Description

      Apply this patch to qtbase: https://codereview.qt-project.org/#change,83443

      Notice that "-std=c+11 -stdlib=libc+" is missing from the compiler line when generating the precompiled headers, causing compile failures.

      /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -pipe -g -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk -mmacosx-version-min=10.7 -fvisibility=hidden -Wall -W -fPIC -DQT_NO_MTDEV -DQT_NO_LIBUDEV -DQT_NO_EVDEV -DQT_NO_USING_NAMESPACE -DQT_BUILD_CORE_LIB -DQT_BUILDING_QT -DQT_NO_CAST_TO_ASCII -DQT_ASCII_CAST_WARNINGS -DQT_MOC_COMPAT -DQT_USE_QSTRINGBUILDER -DQT_DEPRECATED_WARNINGS -DQT_DISABLE_DEPRECATED_BEFORE=0x050000 -DPCRE_HAVE_CONFIG_H -DQT_NO_ICONV -DQT_CORE_LIB -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -I../../mkspecs/macx-clang -I. -I../../include -I../../include/QtCore -I../../include/QtCore/5.4.0 -I../../include/QtCore/5.4.0/QtCore -Iglobal -I../3rdparty/pcre -I../3rdparty/harfbuzz/src -I../3rdparty/md5 -I../3rdparty/md4 -I../3rdparty/sha3 -I.moc/debug -x objective-c++-header -c global/qt_pch.h -o .pch/debug/QtCore_debug/objective-c++.pch
      In file included from global/qt_pch.h:64:
      In file included from ../../include/QtCore/qcoreapplication.h:1:
      ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:251:10: error: no type named 'function' in namespace 'std'
          std::function<void(void)> startup = startupFunction;
      

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            buddenha Oswald Buddenhagen
            sorvig Morten Sørvig
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes