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

Missing "FMT_EXTERN_TEMPLATE_API" in struct declarations? #1896

Closed
moiwi opened this issue Sep 23, 2020 · 2 comments
Closed

Missing "FMT_EXTERN_TEMPLATE_API" in struct declarations? #1896

moiwi opened this issue Sep 23, 2020 · 2 comments

Comments

@moiwi
Copy link
Contributor

moiwi commented Sep 23, 2020

When I try to compile format.cc with MSVC 2019 I get

format.h(878,1): warning C4251: 'fmt::v7::detail::basic_data::divtest_table_for_pow5_32': struct 'fmt::v7::detail::divtest_table_entry<uint32_t>' needs to have dll-interface to be used by clients of struct 'fmt::v7::detail::basic_data'
format.h(878): message : see declaration of 'fmt::v7::detail::divtest_table_entry<uint32_t>'
format.h(897): message : see reference to class template instantiation 'fmt::v7::detail::basic_data' being compiled
format.h(879,1): warning C4251: 'fmt::v7::detail::basic_data::divtest_table_for_pow5_64': struct 'fmt::v7::detail::divtest_table_entry<uint64_t>' needs to have dll-interface to be used by clients of struct 'fmt::v7::detail::basic_data'
format.h(879): message : see declaration of 'fmt::v7::detail::divtest_table_entry<uint64_t>'
format.h(881,1): warning C4251: 'fmt::v7::detail::basic_data::dragonbox_pow10_significands_128': struct 'fmt::v7::detail::uint128_wrapper' needs to have dll-interface to be used by clients of struct 'fmt::v7::detail::basic_data'
format.h(821): message : see declaration of 'fmt::v7::detail::uint128_wrapper'
format.h(878,1): warning C4251: 'fmt::v7::detail::basic_data::divtest_table_for_pow5_32': struct 'fmt::v7::detail::divtest_table_entry<uint32_t>' needs to have dll-interface to be used by clients of struct 'fmt::v7::detail::basic_data'
format.h(878): message : see declaration of 'fmt::v7::detail::divtest_table_entry<uint32_t>'
format.h(915): message : see reference to class template instantiation 'fmt::v7::detail::basic_data' being compiled
format.h(879,1): warning C4251: 'fmt::v7::detail::basic_data::divtest_table_for_pow5_64': struct 'fmt::v7::detail::divtest_table_entry<uint64_t>' needs to have dll-interface to be used by clients of struct 'fmt::v7::detail::basic_data'
format.h(879): message : see declaration of 'fmt::v7::detail::divtest_table_entry<uint64_t>'
format.h(881,1): warning C4251: 'fmt::v7::detail::basic_data::dragonbox_pow10_significands_128': struct 'fmt::v7::detail::uint128_wrapper' needs to have dll-interface to be used by clients of struct 'fmt::v7::detail::basic_data'
format.h(821): message : see declaration of 'fmt::v7::detail::uint128_wrapper'

It seems "FMT_EXTERN_TEMPLATE_API" is missing in the declarations of uint128_wrapper and divtest_table_entry.

@vitaut
Copy link
Contributor

vitaut commented Sep 23, 2020

Could you submit a PR since you are in the best position to check that it silences the warning?

@vitaut
Copy link
Contributor

vitaut commented Sep 24, 2020

Fixed in #1898.

@vitaut vitaut closed this as completed Sep 24, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants