From 7fb53dc3b0be864ce80fff2877d1ebcfbf98193f Mon Sep 17 00:00:00 2001 From: triton Date: Wed, 9 Jul 2014 14:12:30 +0100 Subject: [PATCH] Fixed the parser generator to track Clang r204978. Clang now models different Windows environments in the triple and we need to explicitly request the "MSVC" environment to get proper behavior when parsing MSVC headers. --- src/CppParser/Bindings/ParserGen.cs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/CppParser/Bindings/ParserGen.cs b/src/CppParser/Bindings/ParserGen.cs index 39d781be..608dfc6a 100644 --- a/src/CppParser/Bindings/ParserGen.cs +++ b/src/CppParser/Bindings/ParserGen.cs @@ -57,6 +57,9 @@ namespace CppSharp }); options.Libraries.Add("CppSharp.CppParser.lib"); + if (Abi == CppAbi.Microsoft) + options.MicrosoftMode = true; + if (Triple.Contains("apple")) SetupMacOptions(options); @@ -111,12 +114,12 @@ namespace CppSharp public static void Main(string[] args) { Console.WriteLine("Generating the C++/CLI parser bindings for Windows..."); - ConsoleDriver.Run(new ParserGen(GeneratorKind.CLI, "i686-pc-win32", + ConsoleDriver.Run(new ParserGen(GeneratorKind.CLI, "i686-pc-win32-msvc", CppAbi.Microsoft)); Console.WriteLine(); Console.WriteLine("Generating the C# parser bindings for Windows..."); - ConsoleDriver.Run(new ParserGen(GeneratorKind.CSharp, "i686-pc-win32", + ConsoleDriver.Run(new ParserGen(GeneratorKind.CSharp, "i686-pc-win32-msvc", CppAbi.Microsoft)); Console.WriteLine();