Skip to content

Modify CYaml header includes for Swift C++ compatibility#467

Open
johnfairh wants to merge 1 commit intojpsim:mainfrom
johnfairh:cyaml-swift-cpp
Open

Modify CYaml header includes for Swift C++ compatibility#467
johnfairh wants to merge 1 commit intojpsim:mainfrom
johnfairh:cyaml-swift-cpp

Conversation

@johnfairh
Copy link
Copy Markdown

Moving a large Swift-C++ project to Xcode 26 / macOS 15 / arm I hit this error in Xcode about CYaml/yaml.h:

Screenshot 2025-11-06 at 12 28 35

I found this forum post from one of the Apple Swift-C++ developers, made the suggested change, and my projects built again.

@BruceMcRooster
Copy link
Copy Markdown

I had the same issue, so +1 to merging this! By messing around it appears that just moving #include <string.h> outside of extern "C" is the minimal requirement to make this work. Of course, yours just looks cleaner. I believe this is related to this restriction, but I'm not sure why string.h would fall under this (it's not a Clang module).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants