Latest NE changes [Solved]

It is really hard to follow up NE changes. When I left my project just a few months ago it was working. What is changed for Native Extensions? I’m having totally strange!! errors like:

  • use of undeclared identifier ‘nullptr’
  • ‘mutex’ file not found #include
  • and other bunch of ‘expected expression’ errors

I’m using “flags: [“-stdlib=libc++“]” on MacOS. Project works fine with Xcode -> default apple-clang.

 x86_64-osx:
  context:
   flags:      ["-stdlib=libc++"]
   libs:       ["z","c++"]

Is it not C++11 compatible anymore?
‘ISO C++ forbids forward references to ‘enum’ types’

I’d guess you were not testing this NE during the clang transition?

1 Like

Yes, sorry about that. I’m assuming you are talking about iOS/macOS builds?
We recently had to go back from using Clang 6.0 to use Apple Clang again.
And, that means they’re still on some older version, which doesn’t have C++11 as default.

You can enable the support explicitly as usual by adding the:

x86_64-osx:
    context:
        flags: ["-std=c++11"]
4 Likes

Nope ‘Sir Defold’. What a wonderful title :slight_smile:
Because I’m developing my NEs using xcode on MacOS. Xcode uses apple-clang by default. I thought I was on the safe side. Also Defold was using clang (clang 6) for MacOS and iOS before

4 Likes

Thank you, I’m going to try this as soon as possible.
Do you know which version of Apple Clang is available now(latest: 10 )? And are you planning to use Clang 6 again?

2 Likes

Here’s the reported version from Apple Clang:

$ clang --version
Apple LLVM version 10.0.0 (clang-1000.11.45.5)
Target: x86_64-apple-darwin17.7.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin

Well, we’d like to very much, but Apple doesn’t update their open source libraries (in this case libtapi), making it impossible for us to use.

2 Likes

Thank you @Mathias_Westerdahl . Using ‘flags: ["-std=c++11", “-stdlib=libc++”]’ fix it.

3 Likes