Git Product home page Git Product logo

Comments (3)

tannergooding avatar tannergooding commented on August 25, 2024 1

Ah, I see. That should be trivial enough to add given that its validating things on the normal path now.

from clangsharp.

tannergooding avatar tannergooding commented on August 25, 2024

@FiniteReality, the tooling now runs explicit logic to validate the loaded library version is as expected (https://github.com/microsoft/ClangSharp/blob/main/sources/ClangSharp.PInvokeGenerator/PInvokeGenerator.cs#L58-L70):

            var clangVersion = clang.getClangVersion().ToString();

            if (!clangVersion.Contains("13.0.0"))
            {
                throw new InvalidOperationException($"Invalid libClang version. Returned string '{clangVersion}' does not contain '{ExpectedClangVersion}'");
            }

            var clangSharpVersion = clangsharp.getVersion().ToString();

            if (!clangSharpVersion.Contains("13.0.0"))
            {
                throw new InvalidOperationException($"Invalid libClang version. Returned string '{clangSharpVersion}' does not contain '{ExpectedClangSharpVersion}'");
            }

Outside of this, there isn't much that can be done as DllNotFoundException is handled internally by the runtime interop handling; so this is a matter of it not finding libClangSharp in the first place. Setting LD_DEBUG would be the right way to determine what paths where being searched for libClangSharp in this scenario (as .NET and ClangSharp simply use the system default).

from clangsharp.

FiniteReality avatar FiniteReality commented on August 25, 2024

Yeah. The idea was that I could use ClangSharpPInvokeGenerator --version to check that it can find and load the libraries without having it try to do any actual work.

from clangsharp.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.