mingw-cross-env-list
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Mingw-cross-env-list] Problems with linking a simple MagickWand usi


From: Nick White
Subject: Re: [Mingw-cross-env-list] Problems with linking a simple MagickWand using program
Date: Sun, 10 Feb 2013 14:19:27 +0000
User-agent: Mutt/1.5.20 (2009-06-14)

Hi, it's been a while, but I've finally had time to get this stuff
to work. 

On Thu, Sep 27, 2012 at 11:49:27AM +0200, Mark Brand wrote:
> However, there is another problem. Libmng depends on lcms1 but lcms2
> is introduced somewhere else. This leads to symbol conflicts for
> static linking. You can work around this by eliminating libmng
> support, if you can, or by rebuilding libmng without lcms, which is
> pretty easy. You should be able to remove MNG_FULL_CMS from the
> src/libmng.mk file.

Your advice was perfect; thanks Mark. As you suggested, I needed to
disable lcms support in libmng, which was quite straightforward. Is
it useful to have it in mxe by default? Or would it be better way to
have an alternative non-lcms build? Or something else? I'll attach
the diff to the .mk, anyway.

> One problem is that the .pc files installed by MagickWand don't
> include the dependencies necessary for static linking For many
> packages in MXE, we've patched the .pc files where necessary, but
> this hasn't been done here. That means that you have to figure out
> which libraries are needed. A good clue is the in the DEPS list at
> the top of the .mk file. You might end up with something like this:
> 
> i686-pc-mingw32-g++ -fpermissive boxer.c `i686-pc-mingw32-pkg-config
> --cflags --libs MagickWand MagickCore freetype2 libpng libmng
> libtiff-4 OpenEXR IlmBase` -lfftw3 -llcms2 -ljasper -ljpeg -lpthread
> -ltiff -llzma -lz -lpng -lgdi32 -o boxer

I haven't patched the pkgconfig files ImageMagick.pc or
MagickCore.pc currently, as I don't really know what I'm doing...
But as I say, exactly the command you suggested above works. Perhaps
you could add the -l commands above straight to one of the .pc
files? As I say, pkgconfig isn't something I'm confident with, so
I'm reluctant to offer a patch for this.

Anyway, thanks again Mark,

Nick

Attachment: libmng-nolcms.patch
Description: Text Data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]