mono / CppSharp

Tools and libraries to glue C/C++ APIs to high-level languages
MIT License
3.15k stars 518 forks source link

Update Xcode toolchain locations for Xcode 15 #1842

Open cjhowedev opened 7 months ago

cjhowedev commented 7 months ago
Brief Description

Xcode does not store its C++ headers at /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1 any longer. It seems they now need to be selected by their SDK, so it should be /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++ instead for Xcode 15+.

OS: macOS 14.4.1

Used headers
Used settings

Target: Clang

Other settings

Stack trace or incompilable generated code
Error: Could not find a valid C++ include folder: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1
tritao commented 7 months ago

Can you send a PR for this? Don't have a recent Mac machine at this time.

cjhowedev commented 7 months ago

The build doesn't seem to work under Rosetta x86_64 or arm64 on my M1 Macbook. Not sure if the compiled LLVM binaries for arm64 are working. We will likely need to get the arm64 build working for me to contribute, but this is something we also likely need to do for MacOS support going forward.