From 6597c9b777b608a96974b4a7a8c15234b05ffdd8 Mon Sep 17 00:00:00 2001 From: Karen Arutyunov Date: Tue, 26 Jul 2016 22:36:33 +0300 Subject: Cleanup DLL export/import --- butl/export | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'butl/export') diff --git a/butl/export b/butl/export index 2b5a5ac..bd7f188 100644 --- a/butl/export +++ b/butl/export @@ -6,8 +6,12 @@ #define BUTL_EXPORT // Normally we don't export class templates (but do complete specializations), -// inline functions, and classes without any member functions. But in the end -// it's all trial and error to figure out what VC needs exported. +// inline functions, and classes with only inline member functions. Exporting +// classes that inherit from non-exported/import bases (e.g., std::string) +// will end up badly. The only known workarounds are to not inherit or to not +// export. Also, MinGW GCC doesn't like seeing non-exported function being +// used before their inline definition. The workaround is to reorder code. In +// the end it's all trial and error. #if defined(LIBBUTL_STATIC) // Using static. # define LIBBUTL_EXPORT -- cgit v1.1