SceneKit.h doesn't compile as Objective-C++

Originator:rolfbjarne
Number:rdar://40824697 Date Originated:
Status:Closed Resolved:
Product:iOS SDK Product Version:Xcode 10 beta 1
Classification: Reproducible:
 
Summary:

SceneKit.h doesn't compile as Objective-C++

Steps to Reproduce:

Execute in terminal (as a single line):

echo "#include <SceneKit/SceneKit.h>" | /Applications/Xcode-beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -isysroot /Applications/Xcode-beta.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk -x objective-c++ -mios-simulator-version-min=6.0 -c -

Expected Results:

No error

Actual Results:

In file included from <stdin>:1:
In file included from /Applications/Xcode10-beta1.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk/System/Library/Frameworks/SceneKit.framework/Headers/SceneKit.h:14:
In file included from /Applications/Xcode10-beta1.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk/System/Library/Frameworks/SceneKit.framework/Headers/SceneKitTypes.h:10:
In file included from /Applications/Xcode10-beta1.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk/usr/include/simd/simd.h:17:
In file included from /Applications/Xcode10-beta1.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk/usr/include/simd/vector.h:47:
/Applications/Xcode10-beta1.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk/usr/include/simd/math.h:1403:10: fatal error: 'cmath' file not found
#include <cmath>
         ^~~~~~~
1 error generated.

Version/Build:

Version 10.0 beta (10L176w)

Comments

Jun 19 Engineering has provided the following information regarding this issue: Thanks for reporting this issue. We have removed support for the old GNU C++ library (stdlibc++) in Xcode 10. Because you’re targeting (iOS6), the compiler selects stdlibc++ by default, which is not longer supported. We will add a new warning in Xcode 10 that clarifies that. To fix your issue you can either upgrade the deployment target to iOS7+ or pass en explicit -stdlib=libc++ argument to your build command (Xcode’s “C++ Standard Library Setting”).

By rolfbjarne at April 11, 2019, 2:07 p.m. (reply...)

Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!