migueldeicaza / SwiftGodot

New Godot bindings for Swift
https://migueldeicaza.github.io/SwiftGodotDocs/tutorials/swiftgodot-tutorials/
MIT License
1.07k stars 70 forks source link

fix building under Xcode 16.0 beta 6 #528

Open mayoff opened 3 weeks ago

mayoff commented 3 weeks ago

Xcode 16.0 beta 6 gives the following errors:

.../GodotRuntime.swift:83:9: error: cannot find 'setenv' in scope
        setenv("__CFBundleIdentifier", "SwiftGodotKit", 0)
        ^~~~~~
.../GodotRuntime.swift:95:13: error: cannot find 'strdup' in scope
            strdup (string)
            ^~~~~~
.../GodotRuntime.swift:108:13: error: cannot find 'free' in scope
            free (cStringArray[i])
            ^~~~

Importing Darwin fixes it on macOS and I have guessed what to import for other environments based on what swift-system does.

This might be something wrong with this beta that is fixed in the next. I have no idea if these imports are necessary long term. I don't think they should cause problems though.