[
https://issues.apache.org/jira/browse/THRIFT-1834?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13557513#comment-13557513
]
Ben Craig commented on THRIFT-1834:
-----------------------------------
Currently, Thrift is designed to be packaged as a static library. As a static
library, the consuming program / dll will only pull in the object files that it
needs, so the per-binary size increase should be pretty small.
Thrift isn't a very good candidate to become a dynamic library. No attempts
are made to preserve binary compatibility, or to provide a C / COM-like
interface to make binary compatibility easy. Thrift throws exceptions derived
from std::exception, and throwing those across module boundaries often cause
trouble, especially when the consuming binary is built with a different
compiler, or even a different version of Visual Studio. Thrift uses boost and
STL types extensively, and those don't maintain binary compatibility either.
It is likely possible to add conditional macros that let most users continue to
package Thrift as a static library, and enable you to build Thrift as a DLL. I
do feel that that is encouraging you to shoot off your own foot though.
> Unable to build C++ Thrift dynamic library on Windows
> -----------------------------------------------------
>
> Key: THRIFT-1834
> URL: https://issues.apache.org/jira/browse/THRIFT-1834
> Project: Thrift
> Issue Type: Bug
> Components: C++ - Library
> Affects Versions: 0.9
> Environment: Windows x86_64 MSVC 2010
> Reporter: Chris Stylianou
> Labels: dll, msvc, thrift, windows
>
> I am unable to build a valid .dll version of the Thrift C++ library using
> MSVC2010 as nothing has been declared with
> "__declspec(dllexport)/__declspec(dllimport)", meaning that MSVC2010 (and
> presumably all other versions) are unable to generate the import .lib that
> should accompany the .dll library.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira