Portability Problem (Windows)

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Post by magick »

Our standard answer to Windows compiler/run-time problems is to build one of the Magick++ demos found in c:\Program Files\ImageMagick-6.2.6-Q16\Magick++_Demos. Build the button demo and run. Most likely it will compile and run. You can then use this project as a template for your own project.

Another standard answer for minimizing dependacies under Windows, is to build ImageMagick as an "uninstalled" static multi-threaded project. The project is uninstalled by default unless you specifically uncomment UseInstalledMagick when running the configure program and editting magick-config.h. When you package ImageMagick for redistribution with your project just put all the configuration files and the library in the same folder. ImageMagick should find them at run time. You can verify by setting the MAGICK_DEBUG environment variable to configure. When you run ImageMagck it displays where its looking for its configuration files.
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Post by magick »

Try adding
  • using MagickLib::GetQuantumInfo;
to Magick++/lib/Magick++/Include.h. That should fix the problem.
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Post by magick »

Did you build ImageMagick from source or are you using the pre-compiled binaries? If the latter, it will always check the Windows registry since it was built with UseInstalledMagick defined. ImageMagick will look in the execution path of the program for any dll's to load only if UseInstalledMagick if not defined. This is done as a security measure to prevent someone from installing a nefarious ImageMagick DLL on a Windows box.
Post Reply