I am currently trying to build a Windows-version of emacs that supports ImageMagick.
For that purpose I have already compiled ImageMagick with MinGW32/MSys in order to get compatible library files. Basically linking also works, though I have to add explicitly -llibMagickCore-6.Q16
and -llibMagickWand-6.Q16
to the linking command through configure.bat
's --lib
option.
However, the binary distribution of emacs for windows is supposed to load, even when the dependencies are absent. This behaviour I obtain when I add the linker option (configure.bat --ldflags
) -static
.
However, when I try to compile with ImageMagick-Support, static linking fails saying it cannot find the ImageMagick includes.
The library files are located in D:/BUILD/libraries/lib
. As a minimal example:
D:\>ld -LD:/BUILD/libraries/lib -llibMagickWand-6.Q16
D:\>ld -static -LD:/BUILD/libraries/lib -llibMagickWand-6.Q16
ld: cannot find -llibMagickWand-6.Q16
The directory does however contain the static library.
D:\BUILD\libraries\lib>dir *Magick*
[...]
2013-07-02 15:16 2,585,830 libMagick++-6.Q16.a
2013-07-02 15:16 1,745,404 libMagick++-6.Q16.dll.a
2013-07-02 15:16 1,178 libMagick++-6.Q16.la
2013-07-02 15:16 5,153,712 libMagickCore-6.Q16.a
2013-07-02 15:16 977,292 libMagickCore-6.Q16.dll.a
2013-07-02 15:16 1,096 libMagickCore-6.Q16.la
2013-07-02 15:16 1,609,692 libMagickWand-6.Q16.a
2013-07-02 15:16 472,364 libMagickWand-6.Q16.dll.a
2013-07-02 15:16 1,142 libMagickWand-6.Q16.la
Any idea, what could be going wrong here? From what I understand, the .a
files are the static libraries for MinGW, so the absence of .lib
files (Visual Studio) shouldn't be a problem.
I have used the Unix source distribution of ImageMagick, because the Windows sources require Visual Studio for building.