CppSharp
CppSharp copied to clipboard
InvalidOperationException on parsing
Brief Description
I'm trying to make bindings for a providers library, but it always throws this exception "System.InvalidOperationException: 'the sequence contains no matching elements'"
OS: Windows 10 version 19042.789
Used headers
Used settings
Target: MSVC/GCC/Clang
at System.Linq.Enumerable.First[TSource](IEnumerable1 source, Func2 predicate)
at CppSharp.Generators.CSharp.CSharpSources.GenerateFieldGetter(Field field, Class class, QualifiedType returnType)
at CppSharp.Generators.CSharp.CSharpSourcesExtensions.GenerateField(CSharpSources gen, Class class, Field field, Action3 generate, Boolean isVoid) at CppSharp.Generators.CSharp.CSharpSources.GeneratePropertyGetter[T](T decl, Class class, Boolean isAbstract, Property property) at CppSharp.Generators.CSharp.CSharpSources.GenerateProperties(Class class) at CppSharp.Generators.CSharp.CSharpSources.GenerateClassProperties(Class class) at CppSharp.Generators.CSharp.CSharpSources.VisitClassDecl(Class class) at CppSharp.AST.Class.Visit[T](IDeclVisitor1 visitor)
at CppSharp.Generators.CSharp.CSharpSources.VisitDeclContext(DeclarationContext context)
at CppSharp.Generators.CodeGenerator.VisitNamespace(Namespace namespace)
at CppSharp.Generators.CSharp.CSharpSources.VisitNamespace(Namespace namespace)
at CppSharp.Generators.CodeGenerator.VisitTranslationUnit(TranslationUnit unit)
at CppSharp.AST.TranslationUnit.Visit[T](IDeclVisitor`1 visitor)
at CppSharp.Generators.CSharp.CSharpSources.Process()
at CppSharp.Generators.Generator.GenerateModuleTemplate(Module module)
at CppSharp.Generators.Generator.Generate()
at CppSharp.Driver.GenerateCode()
at CppSharp.ConsoleDriver.Run(ILibrary library)
at OrionBindingsGenerator.Program.Main(String[] args) en MyPath\Program.cs:línea 14
We need some way to reproduce the issue, could you post a minimal (if possible) example header to reproduce the crash?
@miker1423, @tritao's correct - I can see you've skipped the section for used headers which is arguably the most useful piece we need to track problems down.