xoofx/CppAst.NET

can't work on macos?

jiangzhhhh opened this issue · 2 comments

on macos, I simple try to use CppParser.Parse. It always can't find some standard c++ header(for example the stdio.h).
whether specific parse options need to set?

It does work on macOS, but depending on what you are parsing you may need to add some extra options for example these are the options I add on my little app:

p.TargetSystem = "darwin";
p.TargetVendor = "apple";
p.SystemIncludeFolders.Add("/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include");
p.SystemIncludeFolders.Add("/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1");
p.SystemIncludeFolders.Add("/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include");
p.SystemIncludeFolders.Add("/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/11.0.0/include");
p.AdditionalArguments.Add("-stdlib=libc++");

thanks, the parse options you provided can resolve my problem.