[Top][All Lists]

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

Re: [Mingw-cross-env-list] gd: define required for static linking (NOND

From: Tony Theodore
Subject: Re: [Mingw-cross-env-list] gd: define required for static linking (NONDLL)
Date: Wed, 16 Jun 2010 21:16:21 +1000

On 16 June 2010 18:06, Volker Grabsch <address@hidden> wrote:
> Tony Theodore <address@hidden> schrieb:
>> On 16 June 2010 10:26, Natalie Tasman <address@hidden> wrote:
>> > I'm getting link errors with gd which look like dynamic
>> > implementations are expect for the static library.
>> >
>> > I checked i686-pc-mingw32-pkg-config, but it seems that gd doesn't use
>> > packageconfig (no corresponding .pc file.)
>> It seems to use it's own gdlib-config which you'll find in
>> usr/$(TARGET)/bin. The --cflags option should return -DNONDLL.
> Does "gdlib-config --libs" (or similar) return the complete set
> of libraries required to link to gd statically? If not, we should
> provide a way without the "-DNONDLL" option, i.e. performing the
> mentioned $(SED) hack instead of manipulating gdlib-config.

There's already a $(SED) hack for gdlib-config.in and almost does the
right thing, it's missing -lgd :

$ usr/i686-pc-mingw32/bin/gdlib-config --cflags --libs
-I/Users/tonytheodore/dev/mingw-cross-env/usr/i686-pc-mingw32/include -DNONDLL
-ljpeg -lfreetype -lpng -lz
-lxml2 -lz -liconv -lws2_32

> In order to figure that out, it would be great to have simple
> test programm as we had for libarchive.
> That way, we could ensure that "gdlib-config" will always be
> sufficient, now as well as in future versions.

I've attached a simple test program that I modified from one of the
examples. Oddly the test program builds and runs correctly with just
-lgd -lpng -lz specified. It doesn't seem to need -DNONDLL.


P.S. The attached also includes the previous changes for libpng14

Attachment: gd-libpng14-plus-test.patch
Description: Binary data

reply via email to

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