[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Devel] shared library under Windows
From: |
Antoine Leca |
Subject: |
Re: [Devel] shared library under Windows |
Date: |
Fri, 06 Apr 2001 20:31:13 +0200 |
Thierry Frey wrote:
>
> I've tried to compile freetype-2.0.1 using flat mode under Windows.
<snip>
> Furthermore, in ftgrays.h, it is written
>
> /* On some systems and compilers (Win32 mostly), an extra keyword is */
> /* necessary to compile the library as a DLL. */
<snip>
> What keyword are we talking about? Where do you insert it?
Old versions of Win32 C compilers (and in fact, this traces back to OS/2
and Win16) did uses a strange syntax to specify that some non-static
functions are to be exported "automatically". It looked like
int _exports func( /* .. */ )
And these compilers insisted to have the _exports being inserted *between*
the type specifiers and the identifier of the function (_exports is just an
example here, you may have __stdcall, or _far, or _loadds, or other oddities
instead!)
Nowadays, I believe that many compilers do not worry with the added overhead,
and export all the non-static symbols by default, which makes this notation
quite spurious (note that I do not know is there is an ad-hoc .DEF file to
build the .DLL, in which case the stuff above is not mandatory either).
Also possibly your compiler is more permissive and accept free-format
specifiers.
The bottom line is, if it does work for you without the FT_EXPORT_xxx stuff,
don't worry about it.
You can also take a look at the resulting file after preprocessing (using -E
or -EP option in the command line compiler), this should show you what is the
real expansion used in your case.
Antoine