Building windows demo - cannot open X11.lib

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?".
Locked
darlingm
Posts: 12
Joined: 2014-07-06T18:09:24-07:00
Authentication code: 6789

Building windows demo - cannot open X11.lib

Post by darlingm »

Downloaded and installed ImageMagick-6.9.1-0-Q8-x64-dll.exe

Checked "Install development headers and libraries for C and C++".

Installed fine, and "convert --version" gives:

Code: Select all

Version: ImageMagick 6.9.0-10 Q8 x64 2015-02-28 http://www.imagemagick.org
Copyright: Copyright (C) 1999-2015 ImageMagick Studio LLC
License: http://www.imagemagick.org/script/license.php
Features: DPC Modules OpenMP
Delegates (built-in): bzlib cairo freetype jbig jng jp2 jpeg lcms lqr openexr pangocairo png ps rsvg tiff webp xml zlib
If I open (as administrator) "C:\Program Files\ImageMagick-6.9.0-Q8\Magick++_Demo\Magick++_Demo.dsw" in Visual Studio 2013 and let it convert to the new VS format, it converts fine.

But, then, when I try to compile I get:

Code: Select all

1>LINK : fatal error LNK1181: cannot open input file 'X11.lib'
Searching my entire hard drive shows X11.lib is not on my system. Is this supposed to come with the ImageMagick Windows binary installation? Or, do I need to get it elsewhere? If so, where do I get it? I see Cygwin has a X11.dll, but I am NOT using Cygwin. (But, I can install it if that's the one needed...)

darlingm
Posts: 12
Joined: 2014-07-06T18:09:24-07:00
Authentication code: 6789

Re: Building windows demo - cannot open X11.lib

Post by darlingm »

At https://github.com/rmagick/rmagick/issues/27, SIBUK's comment on Feb 17 says there used to be 4 .lib files in ImageMagick's "lib" directory -- CORE_RL_magick_.lib, CORE_RL_Magick++_.lib, CORE_RL_wand_.lib, and x11.lib. He also says recent versions of ImageMagick haven't shipped with x11.lib.

That's what I'm seeing as well. I have the 3 CORE*_.lib files, in "C:\Program Files\ImageMagick-6.9.0-Q8\lib"

He suggests downloading 6.7.7-0 and copying over it's x11.lib, which I'm thinking is a bad idea, but not something I can try because "ImageMagick-6.7.7-0-Q8-windows-x64-dll.exe" never seems to have been released. Looks like you could get a Q16 x64 or a Q8 32-bit back then, but not a Q8 x64.

darlingm
Posts: 12
Joined: 2014-07-06T18:09:24-07:00
Authentication code: 6789

Re: Building windows demo - cannot open X11.lib

Post by darlingm »

Realized I should try ImageMagick-6.7.7-Q16-windows-x64-dll.exe, since quantum depth might not affect x11.lib.

Installed that, and its lib directory does have X11.lib. And it's modified date is 9/5/2009 where the CORE*_.lib modified dates are 5/18/2012, so perhaps it hasn't been updated and using a previous IM version's X11.lib might be OK.

Anyways, copying the old version's X11.lib allows the Demo directory to compile, link, and appear to run correctly.

If you guys could add it back into future installers, that would help someone out!

User avatar
dlemstra
Posts: 1625
Joined: 2013-05-04T15:28:54-07:00
Authentication code: 6789
Contact:

Re: Building windows demo - cannot open X11.lib

Post by dlemstra »

You can remove X11.lib from the "Addional Dependencies" in "Configuration Properties" -> "Linker" -> "Input" in the demo project. We are no longer supporting X11 with the Windows build of ImageMagick. We have patched the demo project files, this will be fixed in the next release of ImageMagick.
.NET + ImageMagick = Magick.NET https://github.com/dlemstra/Magick.NET, @MagickNET, Donate

darlingm
Posts: 12
Joined: 2014-07-06T18:09:24-07:00
Authentication code: 6789

Re: Building windows demo - cannot open X11.lib

Post by darlingm »

Thanks, that appears to do the trick without consequences.

Locked