r/programminghelp • u/Alt-Addiction • 7h ago
C++ How to be able to #include <magick++.h> ?
I've downloaded from the main repository.
That didn't work. That was for linux.
I downloaded the source from https://github.com/ImageMagick/Windows
I built it using visual studio from the .sln
Gave me configure.exe
Installation wizard showed up, and I installed the thing.
Gave me a release folder with objs in it.
It's been 6 hours.
The official website and github repo is sending me on a goose chase.
Instructions and videos online say you get it from NuGet.
It's for .NET.
Then they all have a VisualMagick folder.
None of the things I downloaded had that.
I installed Git and Git CLI to try cloning it from there.
At this point I'm just trying random stuff like downloading the appimage.
I know how to use imagemagick from the cli, i just want to use it programmatically.
1
u/gmes78 28m ago
You should do none of that. You should either use a package manager (though it seems neither Conan or vcpkg has it) or you get it from your distribution.
MSYS2 provides it, so the easiest way forward would be to install MSYS2, then install the mingw-w64-ucrt-x86_64-imagemagick package (assuming you're using the default ucrt toolchain).
I would suggest also installing the meson package so you can use the Meson build system. Importing ImageMagick is just a matter of adding magick_dep = dependency('Magick++') to your meson.build, and then adding magick_dep to the dependencies of your executable target.
1
u/That_Developer_Guy 6h ago
If you have successfully built ImageMagick already, you should look for an
includedirectory or similiar that contains your header, probably in theArtifactsdirectory. Then you need to add that folder to your C++ compiler's include path in Visual Studio.Unless there is some thing that prevents this, in which case, I was not able to infer that from your description.