--- Begin Message ---
Subject: |
Freetype, Windows, and static linking. |
Date: |
Fri, 13 Apr 2018 11:53:08 +0200 |
Hi,
Since commit c94d042be61ce3a1cdcf281c473e674a76b117ba
Author: Alexei Podtelezhnikov <address@hidden>
Date: Tue Jan 2 21:38:35 2018 -0500
* include/freetype/config/ftconfig.h (FT_EXPORT, FT_EXPORT_DEF)
[_MSC_VER]: Limit Visual C++ attributes.
It is no longer possible to build freetype as a static library on windows.
I would suggest guarding the macros that use __declspec with a
FT_STATIC or FT_SHARED ifdef so that this behavior can easily be
toggled without needing to mess about with providing a custom
FT_CONFIG_OPTION_H file.
Maybe something like this:
@@ -462,6 +462,7 @@ FT_BEGIN_HEADER
#endif
#ifdef _MSC_VER
+#ifndef FT_STATIC
#undef FT_EXPORT
#ifdef _DLL
#define FT_EXPORT( x ) __declspec( dllexport ) x
@@ -469,6 +470,7 @@ FT_BEGIN_HEADER
#define FT_EXPORT( x ) __declspec( dllimport ) x
#endif
#endif
+#endif
--- End Message ---