jpsim / Yams

A Sweet and Swifty YAML parser.
https://jpsim.com/Yams
MIT License
1.11k stars 141 forks source link

Failed to debug project with LLDB in SPM #425

Open SpectralDragon opened 3 months ago

SpectralDragon commented 3 months ago

Hi there! When I use Yams in SPM project with C++ interop, I encounter the next error:

/SourcePackages/checkouts/Yams/Sources/CYaml/include/yaml.h:21:1: import of C++ module 'std_string_h' appears within extern "C" language linkage specification
#include <string.h>
^
<module-includes>:2:9: note: in file included from <module-includes>:1:<module-includes>:2:
#import "yaml.h"
        ^
/SourcePackages/checkouts/Yams/Sources/CYaml/include/yaml.h:16:1: note: extern "C" language linkage specification begins here
extern "C" {
^
error: could not build Objective-C module 'CYaml'
error: couldn't IRGen expression: Clang importer error
error: /SourcePackages/checkouts/Yams/Sources/CYaml/include/yaml.h:20:1: import of C++ module 'std_string_h' appears within extern "C" language linkage specification
#include <string.h>
^

I've no idea what the problem is.