1

So it's been now 4 hours I've been trying to get Magick++ to work. For some reason, it never occurred me that an external library worked without problems. Usually it takes about six hours of pure time googling.

After a lot of pain I've finally achieved to get the first part of compilation right (extept the tons of warnings), but the linking is problematic. I've found this post about Imagick linking errors and this one about adding the Imagick paths to the project.

After adding the Imagick/lib to the Linker settings in Visual C++ project this is the only message that coumes out of the compiler:

1>------ Build started: Project: stripes, Configuration: Debug Win32 ------
1>LINK : fatal error LNK1104: cannot open file 'C:\Program Files\ImageMagick\lib.obj'
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

What is this supposed to be? Have I accidentally edited something else?

In Project properties -> Configuration properties, I edited following:

  • VC++ Directories
    • Include Directories - added C:\Program Files\ImageMagick\include
    • Library Directories - added C:\Program Files\ImageMagick\lib
  • Linker
    • General
      • Additional Library Directories - added C:\Program Files\ImageMagick\lib
    • Input
      • Additional Dependencies
        • added CORE_RL_Magick++_.lib
        • added CORE_RL_magick__.lib
        • added X11_.lib
Community
  • 1
  • 1
Tomáš Zato
  • 50,171
  • 52
  • 268
  • 778

1 Answers1

0

So, even though the library still does not work for me, I've overcome this particular problem. It took me another hour.

The solution was to:

  1. Download the source archive here.
  2. Run the \VisualMagick\configure\configure.exe1 ImageMagick configure tool for windows
  3. There should be now a Visual Studio file in \VisualMagick\VisualDynamicMT.sln Visual magick sln file
  4. Open it. You'll probably need to convert the solution to your visual studio version. Once this is done (it's automatical), clean and build the All project: Building the Magick++ libraries
  5. By this time the libraries and DLLs should be built. You're interested in \VisualMagick\lib\*. In the installation folder of imagick, backup all present libraries and then copy (and overwrite) all newly compiled ones.

1 All paths are relative to archive root

The project now compiles but does not run.

Community
  • 1
  • 1
Tomáš Zato
  • 50,171
  • 52
  • 268
  • 778