Skip to content

Make ClangSharpPInvokeGenerator --version output native library versions #125

@FiniteReality

Description

@FiniteReality

Rationale: It's a pain to specify a bunch of parameters just to check that I've got the project set up correctly.

For example, I'm trying to diagnose a few issues loading the utility library, and I'm getting this in the output:

~/Development/ClangSharp$ dotnet run --project sources/ClangSharpPInvokeGenerator/ClangSharpPInvokeGenerator.csproj --runtime debian.10-x64 --framework netcoreapp3.1 -- -f ../thermite/natives/minimp3/minimp3.h -l test -n test -o ../test.cs
Unhandled exception: System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation.
 ---> System.DllNotFoundException: Unable to load shared library 'libClangSharp' or one of its dependencies. In order to help diagnose loading problems, consider setting the LD_DEBUG environment variable: liblibClangSharp: cannot open shared object file: No such file or directory
   at ClangSharp.Interop.clangsharp.Cursor_getDeclKind(CXCursor C)
   at ClangSharp.Interop.CXCursor.get_DeclKind() in /home/dev/Development/ClangSharp/sources/ClangSharp/Interop.Extensions/CXCursor.cs:line 56
// ... and the rest of the stack trace, trimmed for clarity

Being able to run something as simple as --version would be incredibly helpful without having to ensure my paths and filenames are 100% correct every time I invoke the tool. It'd also be more useful as a complete "test" to ensure that the tool has been built correctly (which it clearly isn't in my case).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions