-
Notifications
You must be signed in to change notification settings - Fork 68
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
error[E0425]: cannot find value QuantumRange
in module bindings
#40
Comments
The generated bindings can be quite troublesome, I have to admit. I don't have a Windows system to test this, but that may not be the issue. If I can get a Windows VM to test with, I'll give it a try. In the mean time, look for the |
There's no QuantumRange "whole word" in bindings.rs, The only matches are: extern "C" {
pub fn GetMagickQuantumRange(arg1: *mut usize) -> *const libc::c_char;
}
extern "C" {
pub fn MagickGetQuantumRange(arg1: *mut usize) -> *const libc::c_char;
} |
I'm seeing the same issue on my Gentoo system. |
Seing the same error with Gentoo Linux, |
Still happens as of v0.11.0. I'm on Gentoo as well. |
Sorry to exhume this but maybe it'll be helpful: I've come across this error now using Ubuntu 18.04. What happened was I was using a quantum depth of 16 before and the build worked, everything was happy, but I was having some performance issues so I tried re-building ImageMagick with a quantum depth of 8 and hdri disabled, and now I'm getting the "QuantumRange not found in This is with ImageMagick 7.0.10-16 and magick_rust 0.14.0, rust 0.45.0-nightly |
I see, that would certainly explain why some people see it and others do not. I wish I knew how to deal with this in better way. |
After a little digging I think the problem with this is to do with this issue: You can see a similar cast/define being performed where HDRI is disabled in magick-type.h when defining the QuantumRange type (indentation editorialised somewhat here)
So I'm just recompiling with quantum size=8 and hdri enabled which, if I'm correct, should give me the QuantumRange type in this library. I'll update here when I've tested it. Edit: it works |
Had this issue randomly, the patch giving Also, |
Sorry it took me a long time to respond to this. I've updated the README file so that this issue is easier resolve, at least with this temporary work-around. Eventually the issue in rust-bindgen will be fixed, and setting the feature flag in your application won't be necessary any more. I think for now this issue can be closed, since there is a work-around and finally some guidance in the README file. |
I have this error with magick-rust 0.9. 0.8 seems fine.
Windows
ImageMagick-7.0.7-31
nightly-x86_64-pc-windows-msvc (default)
rustc 1.27.0-nightly (428ea5f6b 2018-05-06)
The text was updated successfully, but these errors were encountered: