From e90b1da367789f01ad58782ed4e2c0deb5344114 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20K=C3=B6nig?= Date: Wed, 28 Mar 2018 18:33:49 +0200 Subject: [PATCH] Fix linker errors using fmt as shared library in MSVC --- include/fmt/core.h | 2 +- include/fmt/format.h | 2 +- src/format.cc | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/include/fmt/core.h b/include/fmt/core.h index fd53cfbe..0d5b9c2c 100644 --- a/include/fmt/core.h +++ b/include/fmt/core.h @@ -405,7 +405,7 @@ struct error_handler { FMT_CONSTEXPR error_handler(const error_handler &) {} // This function is intentionally not constexpr to give a compile-time error. - void on_error(const char *message); + FMT_API void on_error(const char *message); }; // Formatting of wide characters and strings into a narrow output is disallowed: diff --git a/include/fmt/format.h b/include/fmt/format.h index 0e25c4a5..db3a7c85 100644 --- a/include/fmt/format.h +++ b/include/fmt/format.h @@ -905,7 +905,7 @@ class add_thousands_sep { }; template -Char thousands_sep(locale_provider *lp); +FMT_API Char thousands_sep(locale_provider *lp); // Formats a decimal unsigned integer value writing into buffer. // thousands_sep is a functor that is called after writing each char to diff --git a/src/format.cc b/src/format.cc index 1e164f9d..738fd44b 100644 --- a/src/format.cc +++ b/src/format.cc @@ -13,7 +13,7 @@ template struct internal::basic_data; // Explicit instantiations for char. -template char internal::thousands_sep(locale_provider *lp); +template FMT_API char internal::thousands_sep(locale_provider *lp); template void basic_fixed_buffer::grow(std::size_t); @@ -30,7 +30,7 @@ template FMT_API int internal::char_traits::format_float( // Explicit instantiations for wchar_t. -template wchar_t internal::thousands_sep(locale_provider *lp); +template FMT_API wchar_t internal::thousands_sep(locale_provider *lp); template void basic_fixed_buffer::grow(std::size_t);