You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
(maybe same issue than #1753, but different compiler)
Since 7.0.0, these two simple test programs fail to link when fmt is built as a shared lib with Visual Studio (2017 and 2019, maybe others versions). It works if fmt is header only or static.
test_package.obj : error LNK2019: unresolved external symbol "class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > __cdecl fmt::v6::detail::vformat(class fmt::v6::basic_string_view<char>,struct fmt::v6::format_args)" (?vformat@detail@v6@fmt@@YA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@V?$basic_string_view@D@23@Uformat_args@23@@Z) referenced in function main
test_ranges.obj : error LNK2019: unresolved external symbol "class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > __cdecl fmt::v6::detail::vformat(class fmt::v6::basic_string_view<char>,struct fmt::v6::format_args)" (?vformat@detail@v6@fmt@@YA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@V?$basic_string_view@D@23@Uformat_args@23@@Z) referenced in function main
Might be related to modifications made into core.h for FMT_EXTERN_TEMPLATE_API ? AFAIK, for Visual Studio (but not others compiler on Windows) FMT_EXTERN_TEMPLATE_API shouldn't be __declspec(dllexport) at build time, only FMT_INSTANTIATION_DEF_API.
Seems like also that changes made to FMT_EXTERN_TEMPLATE_API now prevent to build fmt with fvisibility hidden for GNU compilers.
EDIT:
explicit instantiation definition of std::string internal::vformat<char>(string_view, basic_format_args<format_context>) has been removed from format.cc in 7.0.0. Therefore it has no chance to be exported I guess.
The text was updated successfully, but these errors were encountered:
(maybe same issue than #1753, but different compiler)
Since 7.0.0, these two simple test programs fail to link when fmt is built as a shared lib with Visual Studio (2017 and 2019, maybe others versions). It works if fmt is header only or static.
CMakeLists.txt:
test_package.cpp:
test_ranges.cpp:
Errors:
Might be related to modifications made into
core.h
forFMT_EXTERN_TEMPLATE_API
? AFAIK, for Visual Studio (but not others compiler on Windows)FMT_EXTERN_TEMPLATE_API
shouldn't be__declspec(dllexport)
at build time, onlyFMT_INSTANTIATION_DEF_API
.Seems like also that changes made to
FMT_EXTERN_TEMPLATE_API
now prevent to build fmt with fvisibility hidden for GNU compilers.EDIT:
explicit instantiation definition of
std::string internal::vformat<char>(string_view, basic_format_args<format_context>)
has been removed fromformat.cc
in 7.0.0. Therefore it has no chance to be exported I guess.The text was updated successfully, but these errors were encountered: