0

I'm struggling for 2 days to install ImageMagick for Rust on Windows.

There is this crate that uses it:

https://crates.io/crates/magick_rust/0.17.0

Anyways, there is a guide to install for windows. It doesn't work for me! Can anyone try to set it up and tell me how they did it if it worked for them please? I would be very grateful!

Getting always this errorlog even if i tried to do exactly what the guide told me to do:

   Compiling magick_rust v0.17.0
   Compiling tauri v1.2.4
error: failed to run custom build command for `magick_rust v0.17.0`

Caused by:
  process didn't exit successfully: `C:\deskapps\PicFlip\pic_flip\src-tauri\target\debug\build\magick_rust-2f3dc1457e94e45e\build-script-build` (exit code: 101)
  --- stdout
  cargo:rerun-if-env-changed=IMAGE_MAGICK_LIB_DIRS

  --- stderr
  thread 'main' panicked at 'ImageMagick library directory does not exist: C:\Program Files\ImageMagick-7.1.1-Q16-HDRI\include:Magick++:MagickCore:MagickWand', C:\Users\41764\.cargo\registry\src\github.com-1ecc6299db9ec823\magick_rust-0.17.0\build.rs:62:13
  note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
warning: build failed, waiting for other jobs to finish...
Someone
  • 121
  • 1
  • 7
  • It would be helpful if you would list exactly what you did to install ImageMagick etc. What MSVC toolchain are you using? Did you see the "Build on Windows" section and are you running `cargo build` inside the Visual Studio Native Tools Command Prompt as it says? – PitaJ Apr 13 '23 at 17:58
  • I installed the MSVC Toolchain automatically with Visualstudio 2022. --> After that, i set all ENV Variables as they told in the vs command prompt (once with all listed variables and once with only IMAGE_MAGICK_DIR=installationpath. Also i restarted the computer with both options. Also i tried to install ImageMagick with chocolately and once directly through the official website from Magick (.dll) edition. – Maksim Momcilovic Apr 13 '23 at 19:49

0 Answers0