I follow the instructions in https://imagemagick.org/script/advanced ... lation.php and build ImageMagick as "Static Multi-threaded runtimes" settings.
Then I create a test project TestMagick and add https://imagemagick.org/source/wand.c to my project.
Then I add the following path to project's Additional Include Directories:
Then I add the following path to project's Additonal Library Directories:
Then I add these two library files as project's Additonal Dependencies:
Then I built my project as Release version.
But I get the following link errors:
TestMagick.obj: Error LNK2001: unresolved external symbol __imp__MagicWandGenesis
TestMagick.obj: Error LNK2001: unresolved external symbol __imp__NewMagickWand
Since the functions are started with __imp, it seems I should linked with DLL import library instead of static library.
Therefore, I try to rebuild ImageMagick as "Dynamic Multi-threaded DLL runtimes". Then rebuild TestMagick. Now this time, the build is successfully.
However, TestMagick must be placed under ImageMagick's bin directory since it will use a lot of ImageMagick DLLs.
Therefore, I still want to be able to build my project with ImageWand statically. So How to do that?
The MagickWand interface is a new high-level C API interface to ImageMagick core methods. We discourage the use of the core methods and encourage the use of this API instead. Post MagickWand questions, bug reports, and suggestions to this forum.
1 post • Page 1 of 1