Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PInvokeGenerator throws System.AccessViolationException when traversing steam_api_internal.h in Steamworks SDK #510

Open
uwx opened this issue Dec 9, 2023 · 2 comments

Comments

@uwx
Copy link

uwx commented Dec 9, 2023

The P/Invoke generator causes an access violation when generating bindings for the Steamworks SDK headers, when told to traverse steam_api_internal.h. (All other files traverse without errors, except for matchmakingtypes.h which raises an ArgumentOutOfRangeException.)

Reproduced on version 17.0.0, .NET 8.0.100, Windows 10 22H2 x64

Command-line output:

Diagnostics for 'steam_api.h':
    ./matchmakingtypes.h:35:3: warning: 'strncpy' is deprecated: This function or variable may be unsafe. Consider using strncpy_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. [-Wdeprecated-declarations]
    ./matchmakingtypes.h:37:3: warning: 'strncpy' is deprecated: This function or variable may be unsafe. Consider using strncpy_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. [-Wdeprecated-declarations]
    ./matchmakingtypes.h:226:2: warning: 'strncpy' is deprecated: This function or variable may be unsafe. Consider using strncpy_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. [-Wdeprecated-declarations]
Processing 'steam_api.h'
Fatal error. System.AccessViolationException: Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
Repeat 2 times:
--------------------------------
   at ClangSharp.Interop.clangsharp.Cursor_getVtblIdx(ClangSharp.Interop.CXCursor)
--------------------------------
   at ClangSharp.Interop.CXCursor.get_VtblIdx()
   at ClangSharp.CXXMethodDecl.get_VtblIndex()
   at ClangSharp.PInvokeGenerator+<>c.<IsExcluded>b__101_10(ClangSharp.CXXMethodDecl)
   at System.Linq.EnumerableSorter`2[[System.__Canon, System.Private.CoreLib, Version=8.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e],[System.Int64, System.Private.CoreLib, Version=8.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]].ComputeKeys(System.__Canon[], Int32)
   at System.Linq.EnumerableSorter`1[[System.__Canon, System.Private.CoreLib, Version=8.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]].ComputeMap(System.__Canon[], Int32)
   at System.Linq.EnumerableSorter`1[[System.__Canon, System.Private.CoreLib, Version=8.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]].Sort(System.__Canon[], Int32)
   at System.Linq.OrderedEnumerable`1+<GetEnumerator>d__19[[System.__Canon, System.Private.CoreLib, Version=8.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]].MoveNext()
   at ClangSharp.PInvokeGenerator.<IsExcluded>g__ContainsConflictingMethodDecl|101_8(ClangSharp.CXXMethodDecl, ClangSharp.CXXRecordDecl, ClangSharp.CXXRecordDecl, System.String, Boolean ByRef, <>c__DisplayClass101_0 ByRef)
   at ClangSharp.PInvokeGenerator.<IsExcluded>g__IsConflictingMethodDecl|101_6(ClangSharp.CXXMethodDecl, ClangSharp.CXXRecordDecl, <>c__DisplayClass101_0 ByRef)
   at ClangSharp.PInvokeGenerator.<IsExcluded>g__IsExcludedByName|101_3(ClangSharp.Cursor, UInt32 ByRef, <>c__DisplayClass101_0 ByRef)
   at ClangSharp.PInvokeGenerator.IsExcluded(ClangSharp.Cursor, Boolean ByRef)
   at ClangSharp.PInvokeGenerator.IsExcluded(ClangSharp.Cursor)
   at ClangSharp.PInvokeGenerator.VisitDecl(ClangSharp.Decl)
   at ClangSharp.PInvokeGenerator.Visit(ClangSharp.Cursor)
   at ClangSharp.PInvokeGenerator.Visit(System.Collections.Generic.IEnumerable`1<ClangSharp.Cursor>)
   at ClangSharp.PInvokeGenerator.VisitTranslationUnitDecl(ClangSharp.TranslationUnitDecl)
   at ClangSharp.PInvokeGenerator.VisitDecl(ClangSharp.Decl)
   at ClangSharp.PInvokeGenerator.Visit(ClangSharp.Cursor)
   at ClangSharp.PInvokeGenerator.GenerateBindings(ClangSharp.TranslationUnit, System.String, System.String[], ClangSharp.Interop.CXTranslationUnit_Flags)
   at ClangSharp.Program.Run(System.CommandLine.Invocation.InvocationContext)
   at System.CommandLine.Handler+<>c__DisplayClass1_0`1[[System.__Canon, System.Private.CoreLib, Version=8.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]].<SetHandler>b__0(System.CommandLine.Invocation.InvocationContext)
   at System.CommandLine.Invocation.AnonymousCommandHandler+<>c__DisplayClass2_0.<.ctor>g__Handle|0(System.CommandLine.Invocation.InvocationContext)
   at System.CommandLine.Invocation.AnonymousCommandHandler+<InvokeAsync>d__3.MoveNext()
   at System.Runtime.CompilerServices.AsyncMethodBuilderCore.Start[[System.CommandLine.Invocation.AnonymousCommandHandler+<InvokeAsync>d__3, System.CommandLine, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]](<InvokeAsync>d__3 ByRef)
   at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1[[System.Int32, System.Private.CoreLib, Version=8.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]].Start[[System.CommandLine.Invocation.AnonymousCommandHandler+<InvokeAsync>d__3, System.CommandLine, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]](<InvokeAsync>d__3 ByRef)
   at System.CommandLine.Invocation.AnonymousCommandHandler.InvokeAsync(System.CommandLine.Invocation.InvocationContext)
   at System.CommandLine.Invocation.InvocationPipeline+<>c__DisplayClass4_0+<<BuildInvocationChain>b__0>d.MoveNext()
   at System.Runtime.CompilerServices.AsyncMethodBuilderCore.Start[[System.CommandLine.Invocation.InvocationPipeline+<>c__DisplayClass4_0+<<BuildInvocationChain>b__0>d, System.CommandLine, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]](<<BuildInvocationChain>b__0>d ByRef)
   at System.Runtime.CompilerServices.AsyncTaskMethodBuilder.Start[[System.CommandLine.Invocation.InvocationPipeline+<>c__DisplayClass4_0+<<BuildInvocationChain>b__0>d, System.CommandLine, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]](<<BuildInvocationChain>b__0>d ByRef)
   at System.CommandLine.Invocation.InvocationPipeline+<>c__DisplayClass4_0.<BuildInvocationChain>b__0(System.CommandLine.Invocation.InvocationContext, System.Func`2<System.CommandLine.Invocation.InvocationContext,System.Threading.Tasks.Task>)
   at System.CommandLine.Invocation.InvocationPipeline+<>c__DisplayClass4_2.<BuildInvocationChain>b__3(System.CommandLine.Invocation.InvocationContext)
   at System.CommandLine.Builder.CommandLineBuilderExtensions+<>c__DisplayClass18_0+<<UseParseErrorReporting>b__0>d.MoveNext()
   at System.Runtime.CompilerServices.AsyncMethodBuilderCore.Start[[System.CommandLine.Builder.CommandLineBuilderExtensions+<>c__DisplayClass18_0+<<UseParseErrorReporting>b__0>d, System.CommandLine, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]](<<UseParseErrorReporting>b__0>d ByRef)
   at System.Runtime.CompilerServices.AsyncTaskMethodBuilder.Start[[System.CommandLine.Builder.CommandLineBuilderExtensions+<>c__DisplayClass18_0+<<UseParseErrorReporting>b__0>d, System.CommandLine, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]](<<UseParseErrorReporting>b__0>d ByRef)
   at System.CommandLine.Builder.CommandLineBuilderExtensions+<>c__DisplayClass18_0.<UseParseErrorReporting>b__0(System.CommandLine.Invocation.InvocationContext, System.Func`2<System.CommandLine.Invocation.InvocationContext,System.Threading.Tasks.Task>)
   at System.CommandLine.Invocation.InvocationPipeline+<>c__DisplayClass4_2.<BuildInvocationChain>b__3(System.CommandLine.Invocation.InvocationContext)
   at System.CommandLine.Builder.CommandLineBuilderExtensions+<>c__DisplayClass13_0+<<UseHelp>b__0>d.MoveNext()
   at System.Runtime.CompilerServices.AsyncMethodBuilderCore.Start[[System.CommandLine.Builder.CommandLineBuilderExtensions+<>c__DisplayClass13_0+<<UseHelp>b__0>d, System.CommandLine, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]](<<UseHelp>b__0>d ByRef)
   at System.Runtime.CompilerServices.AsyncTaskMethodBuilder.Start[[System.CommandLine.Builder.CommandLineBuilderExtensions+<>c__DisplayClass13_0+<<UseHelp>b__0>d, System.CommandLine, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]](<<UseHelp>b__0>d ByRef)
   at System.CommandLine.Builder.CommandLineBuilderExtensions+<>c__DisplayClass13_0.<UseHelp>b__0(System.CommandLine.Invocation.InvocationContext, System.Func`2<System.CommandLine.Invocation.InvocationContext,System.Threading.Tasks.Task>)
   at System.CommandLine.Invocation.InvocationPipeline+<>c__DisplayClass4_2.<BuildInvocationChain>b__3(System.CommandLine.Invocation.InvocationContext)
   at System.CommandLine.Builder.CommandLineBuilderExtensions+<>c__DisplayClass20_0+<<UseTypoCorrections>b__0>d.MoveNext()
   at System.Runtime.CompilerServices.AsyncMethodBuilderCore.Start[[System.CommandLine.Builder.CommandLineBuilderExtensions+<>c__DisplayClass20_0+<<UseTypoCorrections>b__0>d, System.CommandLine, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]](<<UseTypoCorrections>b__0>d ByRef)
   at System.Runtime.CompilerServices.AsyncTaskMethodBuilder.Start[[System.CommandLine.Builder.CommandLineBuilderExtensions+<>c__DisplayClass20_0+<<UseTypoCorrections>b__0>d, System.CommandLine, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]](<<UseTypoCorrections>b__0>d ByRef)
   at System.CommandLine.Builder.CommandLineBuilderExtensions+<>c__DisplayClass20_0.<UseTypoCorrections>b__0(System.CommandLine.Invocation.InvocationContext, System.Func`2<System.CommandLine.Invocation.InvocationContext,System.Threading.Tasks.Task>)
   at System.CommandLine.Invocation.InvocationPipeline+<>c__DisplayClass4_2.<BuildInvocationChain>b__3(System.CommandLine.Invocation.InvocationContext)
   at System.CommandLine.Builder.CommandLineBuilderExtensions+<>c+<<UseSuggestDirective>b__19_0>d.MoveNext()
   at System.Runtime.CompilerServices.AsyncMethodBuilderCore.Start[[System.CommandLine.Builder.CommandLineBuilderExtensions+<>c+<<UseSuggestDirective>b__19_0>d, System.CommandLine, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]](<<UseSuggestDirective>b__19_0>d ByRef)
   at System.Runtime.CompilerServices.AsyncTaskMethodBuilder.Start[[System.CommandLine.Builder.CommandLineBuilderExtensions+<>c+<<UseSuggestDirective>b__19_0>d, System.CommandLine, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]](<<UseSuggestDirective>b__19_0>d ByRef)
   at System.CommandLine.Builder.CommandLineBuilderExtensions+<>c.<UseSuggestDirective>b__19_0(System.CommandLine.Invocation.InvocationContext, System.Func`2<System.CommandLine.Invocation.InvocationContext,System.Threading.Tasks.Task>)
   at System.CommandLine.Invocation.InvocationPipeline+<>c__DisplayClass4_2.<BuildInvocationChain>b__3(System.CommandLine.Invocation.InvocationContext)
   at System.CommandLine.Builder.CommandLineBuilderExtensions+<>c__DisplayClass17_0+<<UseParseDirective>b__0>d.MoveNext()
   at System.Runtime.CompilerServices.AsyncMethodBuilderCore.Start[[System.CommandLine.Builder.CommandLineBuilderExtensions+<>c__DisplayClass17_0+<<UseParseDirective>b__0>d, System.CommandLine, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]](<<UseParseDirective>b__0>d ByRef)
   at System.Runtime.CompilerServices.AsyncTaskMethodBuilder.Start[[System.CommandLine.Builder.CommandLineBuilderExtensions+<>c__DisplayClass17_0+<<UseParseDirective>b__0>d, System.CommandLine, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]](<<UseParseDirective>b__0>d ByRef)
   at System.CommandLine.Builder.CommandLineBuilderExtensions+<>c__DisplayClass17_0.<UseParseDirective>b__0(System.CommandLine.Invocation.InvocationContext, System.Func`2<System.CommandLine.Invocation.InvocationContext,System.Threading.Tasks.Task>)
   at System.CommandLine.Invocation.InvocationPipeline+<>c__DisplayClass4_2.<BuildInvocationChain>b__3(System.CommandLine.Invocation.InvocationContext)
   at System.CommandLine.Builder.CommandLineBuilderExtensions+<>c+<<RegisterWithDotnetSuggest>b__6_0>d.MoveNext()
   at System.Runtime.CompilerServices.AsyncMethodBuilderCore.Start[[System.CommandLine.Builder.CommandLineBuilderExtensions+<>c+<<RegisterWithDotnetSuggest>b__6_0>d, System.CommandLine, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]](<<RegisterWithDotnetSuggest>b__6_0>d ByRef)
   at System.Runtime.CompilerServices.AsyncTaskMethodBuilder.Start[[System.CommandLine.Builder.CommandLineBuilderExtensions+<>c+<<RegisterWithDotnetSuggest>b__6_0>d, System.CommandLine, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]](<<RegisterWithDotnetSuggest>b__6_0>d ByRef)
   at System.CommandLine.Builder.CommandLineBuilderExtensions+<>c.<RegisterWithDotnetSuggest>b__6_0(System.CommandLine.Invocation.InvocationContext, System.Func`2<System.CommandLine.Invocation.InvocationContext,System.Threading.Tasks.Task>)
   at System.CommandLine.Invocation.InvocationPipeline+<>c__DisplayClass4_2.<BuildInvocationChain>b__3(System.CommandLine.Invocation.InvocationContext)
   at System.CommandLine.Builder.CommandLineBuilderExtensions+<>c.<UseEnvironmentVariableDirective>b__7_0(System.CommandLine.Invocation.InvocationContext, System.Func`2<System.CommandLine.Invocation.InvocationContext,System.Threading.Tasks.Task>)
   at System.CommandLine.Invocation.InvocationPipeline+<>c__DisplayClass4_2.<BuildInvocationChain>b__3(System.CommandLine.Invocation.InvocationContext)
   at System.CommandLine.Builder.CommandLineBuilderExtensions+<>c__DisplayClass9_0+<<UseExceptionHandler>b__0>d.MoveNext()
   at System.Runtime.CompilerServices.AsyncMethodBuilderCore.Start[[System.CommandLine.Builder.CommandLineBuilderExtensions+<>c__DisplayClass9_0+<<UseExceptionHandler>b__0>d, System.CommandLine, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]](<<UseExceptionHandler>b__0>d ByRef)
   at System.Runtime.CompilerServices.AsyncTaskMethodBuilder.Start[[System.CommandLine.Builder.CommandLineBuilderExtensions+<>c__DisplayClass9_0+<<UseExceptionHandler>b__0>d, System.CommandLine, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]](<<UseExceptionHandler>b__0>d ByRef)
   at System.CommandLine.Builder.CommandLineBuilderExtensions+<>c__DisplayClass9_0.<UseExceptionHandler>b__0(System.CommandLine.Invocation.InvocationContext, System.Func`2<System.CommandLine.Invocation.InvocationContext,System.Threading.Tasks.Task>)
   at System.CommandLine.Invocation.InvocationPipeline+<>c__DisplayClass4_2.<BuildInvocationChain>b__3(System.CommandLine.Invocation.InvocationContext)
   at System.CommandLine.Builder.CommandLineBuilderExtensions+<>c+<<CancelOnProcessTermination>b__1_0>d.MoveNext()
   at System.Runtime.CompilerServices.AsyncMethodBuilderCore.Start[[System.CommandLine.Builder.CommandLineBuilderExtensions+<>c+<<CancelOnProcessTermination>b__1_0>d, System.CommandLine, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]](<<CancelOnProcessTermination>b__1_0>d ByRef)
   at System.Runtime.CompilerServices.AsyncTaskMethodBuilder.Start[[System.CommandLine.Builder.CommandLineBuilderExtensions+<>c+<<CancelOnProcessTermination>b__1_0>d, System.CommandLine, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]](<<CancelOnProcessTermination>b__1_0>d ByRef)
   at System.CommandLine.Builder.CommandLineBuilderExtensions+<>c.<CancelOnProcessTermination>b__1_0(System.CommandLine.Invocation.InvocationContext, System.Func`2<System.CommandLine.Invocation.InvocationContext,System.Threading.Tasks.Task>)
   at System.CommandLine.Invocation.InvocationPipeline+<>c__DisplayClass4_1.<BuildInvocationChain>b__2(System.CommandLine.Invocation.InvocationContext, System.Func`2<System.CommandLine.Invocation.InvocationContext,System.Threading.Tasks.Task>)
   at System.CommandLine.Invocation.InvocationPipeline+<>c__DisplayClass4_1.<BuildInvocationChain>b__2(System.CommandLine.Invocation.InvocationContext, System.Func`2<System.CommandLine.Invocation.InvocationContext,System.Threading.Tasks.Task>)
   at System.CommandLine.Invocation.InvocationPipeline+<>c__DisplayClass4_1.<BuildInvocationChain>b__2(System.CommandLine.Invocation.InvocationContext, System.Func`2<System.CommandLine.Invocation.InvocationContext,System.Threading.Tasks.Task>)
   at System.CommandLine.Invocation.InvocationPipeline+<>c__DisplayClass4_1.<BuildInvocationChain>b__2(System.CommandLine.Invocation.InvocationContext, System.Func`2<System.CommandLine.Invocation.InvocationContext,System.Threading.Tasks.Task>)
   at System.CommandLine.Invocation.InvocationPipeline+<>c__DisplayClass4_1.<BuildInvocationChain>b__2(System.CommandLine.Invocation.InvocationContext, System.Func`2<System.CommandLine.Invocation.InvocationContext,System.Threading.Tasks.Task>)
   at System.CommandLine.Invocation.InvocationPipeline+<>c__DisplayClass4_1.<BuildInvocationChain>b__2(System.CommandLine.Invocation.InvocationContext, System.Func`2<System.CommandLine.Invocation.InvocationContext,System.Threading.Tasks.Task>)
   at System.CommandLine.Invocation.InvocationPipeline+<>c__DisplayClass4_1.<BuildInvocationChain>b__2(System.CommandLine.Invocation.InvocationContext, System.Func`2<System.CommandLine.Invocation.InvocationContext,System.Threading.Tasks.Task>)
   at System.CommandLine.Invocation.InvocationPipeline+<>c__DisplayClass4_1.<BuildInvocationChain>b__2(System.CommandLine.Invocation.InvocationContext, System.Func`2<System.CommandLine.Invocation.InvocationContext,System.Threading.Tasks.Task>)
   at System.CommandLine.Invocation.InvocationPipeline+<>c__DisplayClass4_1.<BuildInvocationChain>b__2(System.CommandLine.Invocation.InvocationContext, System.Func`2<System.CommandLine.Invocation.InvocationContext,System.Threading.Tasks.Task>)
   at System.CommandLine.Invocation.InvocationPipeline+<InvokeAsync>d__2.MoveNext()
   at System.Runtime.CompilerServices.AsyncMethodBuilderCore.Start[[System.CommandLine.Invocation.InvocationPipeline+<InvokeAsync>d__2, System.CommandLine, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]](<InvokeAsync>d__2 ByRef)
   at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1[[System.Int32, System.Private.CoreLib, Version=8.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]].Start[[System.CommandLine.Invocation.InvocationPipeline+<InvokeAsync>d__2, System.CommandLine, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]](<InvokeAsync>d__2 ByRef)
   at System.CommandLine.Invocation.InvocationPipeline.InvokeAsync(System.CommandLine.IConsole)
   at System.CommandLine.Parsing.ParseResultExtensions+<InvokeAsync>d__0.MoveNext()
   at System.Runtime.CompilerServices.AsyncMethodBuilderCore.Start[[System.CommandLine.Parsing.ParseResultExtensions+<InvokeAsync>d__0, System.CommandLine, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]](<InvokeAsync>d__0 ByRef)
   at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1[[System.Int32, System.Private.CoreLib, Version=8.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]].Start[[System.CommandLine.Parsing.ParseResultExtensions+<InvokeAsync>d__0, System.CommandLine, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]](<InvokeAsync>d__0 ByRef)
   at System.CommandLine.Parsing.ParseResultExtensions.InvokeAsync(System.CommandLine.Parsing.ParseResult, System.CommandLine.IConsole)
   at System.CommandLine.Parsing.ParserExtensions+<InvokeAsync>d__3.MoveNext()
   at System.Runtime.CompilerServices.AsyncMethodBuilderCore.Start[[System.CommandLine.Parsing.ParserExtensions+<InvokeAsync>d__3, System.CommandLine, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]](<InvokeAsync>d__3 ByRef)
   at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1[[System.Int32, System.Private.CoreLib, Version=8.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]].Start[[System.CommandLine.Parsing.ParserExtensions+<InvokeAsync>d__3, System.CommandLine, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]](<InvokeAsync>d__3 ByRef)
   at System.CommandLine.Parsing.ParserExtensions.InvokeAsync(System.CommandLine.Parsing.Parser, System.String[], System.CommandLine.IConsole)
   at ClangSharp.Program+<Main>d__75.MoveNext()
   at System.Runtime.CompilerServices.AsyncMethodBuilderCore.Start[[ClangSharp.Program+<Main>d__75, ClangSharpPInvokeGenerator, Version=17.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51]](<Main>d__75 ByRef)
   at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1[[System.Int32, System.Private.CoreLib, Version=8.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]].Start[[ClangSharp.Program+<Main>d__75, ClangSharpPInvokeGenerator, Version=17.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51]](<Main>d__75 ByRef)
   at ClangSharp.Program.Main(System.String[])
   at ClangSharp.Program.<Main>(System.String[])

Commands to reproduce:

dotnet tool install --global ClangSharpPInvokeGenerator --version 17.0.0
ClangSharpPInvokeGenerator -f steam_api.h -t steam_api_internal.h -n Steamworks --output bind1.cs

Header files: (Steamworks SDK 1.58a)
steamworks_headers.zip

@DeafMan1983
Copy link

You need to pass with -I <path> or you need to install winget with LLVM for Windows See more If I am correct for Windows x64.

@uwx
Copy link
Author

uwx commented Dec 10, 2023

You need to pass with -I <path> or you need to install winget with LLVM for Windows See more If I am correct for Windows x64.

Neither passing the include directory nor updating LLVM to 17.0.3 via winget changed the output.

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

No branches or pull requests

2 participants