freetype-devel
[Top][All Lists]
Advanced

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

[Devel] freetype2 as a DLL (on Win32)?


From: Tor Lillqvist
Subject: [Devel] freetype2 as a DLL (on Win32)?
Date: Wed, 20 Dec 2000 23:54:01 +0200 (FLE Standard Time)

What are the current thoughts about building freetype2 as a DLL on
Windows? It certainly would be useful. (In fact, having freetype2 as a
DLL seems to be required sometimes. For instance, in order to be able
to run the ottest program recently added to Pango. Otherwise the
pango-ot DLL would have one copy of the static libfreetype linked in,
and ottest.exe another, and passing data structures constructed by the
other incarnation of libfreetype to the other one causes problems. I
think. At least ottest crashed with static libfreetypes, but works
with a DLL one.)

The problem is how to set up the build config files so that they are
useful to most people.

There are many ways to build DLLs depending on what tools and what
version of those tools you have... For MSVC users it is mostly a
question of updating the MSVC project files already in
builds/win32/visualc/, but for gcc users, there are several
alternative methods.

Most recent gcc and binutils for mingw support using a -shared flag,
or so I have gleaned from the mingw mailing list (I don't have these
latest versions). With not-so-bleeding-edge tools a bit more complex
steps are necessary. (Personally I use a "build-dll" script to do it,
it's in the GLib sources. build-dll calls gcc and dlltool. It also
uses MS lib.exe if available to build an import library for MSVC.)

A naming convention should also be agreed on. I suggest
freetype-2.0.dll for the DLL, and libfreetype-2.0.a and
freetype-2.0.lib for the import libraries. Another convention would be
to use libfreetype-2.0.dll.a for the import library.

--tml




reply via email to

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