freetype-devel
[Top][All Lists]
Advanced

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

[ft-devel] FreeType DLL support


From: Alexei Podtelezhnikov
Subject: [ft-devel] FreeType DLL support
Date: Thu, 11 Jan 2018 15:22:56 -0500

Hi All,

As you might have noticed, FreeType 2.9 has added some support for building DLL using Visual C 2010 and above but unfortunately somewhat broke static libraries on that platform (http://savannah.nongnu.org/bugs/?52843). 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.

Comments? Suggestions?
Alexei
 


reply via email to

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