Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix linker errors using fmt as shared library in MSVC #696

Merged
merged 1 commit into from
Mar 28, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion include/fmt/core.h
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion include/fmt/format.h
Original file line number Diff line number Diff line change
Expand Up @@ -905,7 +905,7 @@ class add_thousands_sep {
};

template <typename Char>
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
Expand Down
4 changes: 2 additions & 2 deletions src/format.cc
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ template struct internal::basic_data<void>;

// 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<char>::grow(std::size_t);

Expand All @@ -30,7 +30,7 @@ template FMT_API int internal::char_traits<char>::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<wchar_t>::grow(std::size_t);

Expand Down