Giter Club home page Giter Club logo

Comments (5)

oumad avatar oumad commented on August 22, 2024 5

I'm also getting this message while compiling on Windows 11. Any workaround?

Fixed this by cloning this repo and making these changes in the bindings.rs :
image
Then in my rust app I linked to my local clone of this dependency :

[dependencies]
libvips = {path ="C:/DEV/TESTING/libvips-rust-bindings"}

I also needed to make these changes in the build.rs for this to work on my windows 10 :
image

@augustocdias Maybe there is a way to get a proper fix for all of this in the crate ? I can do a PR if you point me to the right direction ? Or at least I can help put something in the docs for windows users ?

from libvips-rust-bindings.

augustocdias avatar augustocdias commented on August 22, 2024

The problem is that the bindings generates the return and parameters types for those functions based on OS's raw types. I believe you're running on a 32 bits OS (or targeting it), right?

I'll have to research if is there a better way to generate this bindings in a way it can compile in any System.

from libvips-rust-bindings.

fluxxu avatar fluxxu commented on August 22, 2024

Looks like all errors are caused by std::os::raw::c_ulong; type.
In the generated bindings.rs

pub type size_t = ::std::os::raw::c_ulong;
///...
pub type guint64 = ::std::os::raw::c_ulong;

And according to rust's doc

https://doc.rust-lang.org/std/os/raw/type.c_ulong.html

This type will always be u32 or u64. Most notably, many Linux-based systems assume an u64, but Windows assumes u32. 

Is it better to use bindings::guint64 and bindings::size_t?

from libvips-rust-bindings.

augustocdias avatar augustocdias commented on August 22, 2024

Yes. I guess that would solve the problem, but I didn't want to use OS types in the public API...

from libvips-rust-bindings.

kotx avatar kotx commented on August 22, 2024

I'm also getting this message while compiling on Windows 11. Any workaround?

from libvips-rust-bindings.

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.