Am 11.01.2018 um 21:22 schrieb Alexei Podtelezhnikov:
[...]
Basically, we need to hide
those dllimport/dllexport attributes from anything but DLL context. So I
suggested FT2_LINK_DLL compile-time macro because I like it to scream
DLL and I did not like other ideas from
http://geoffair.net/ms/declspec.htm.
Here the proposal:
#ifdef _MSC_VER
#if defined( FT2_BUILD_LIBARY ) && defined( _DLL )
#define FT_EXPORT( x ) __declspec( dllexport ) x
#elif defined( FT2_LINK_DLL )
#define FT_EXPORT( x ) __declspec( dllimport ) x
#endif
#endif
From my reading, FT2_LINK_DLL is actually optional but would optimize
the library calls.
I would also suggest to replace
#ifdef _MSC_VER
with
#ifdef _WIN32
in order to support other Windows compilers too.
Instead of _DLL it might be better to use DLL_EXPORT because it's
automatically defined when configuring the build of a shared library on
Windows with MinGW or Cygwin.
Martin
_______________________________________________
Freetype-devel mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/freetype-devel