Skip to content

fmt shared build lacking symbolsΒ #2011

Closed
@ghost

Description

Hello,

I configured the latest master fmt to build with shared mode. The build processes successfully.
Then I build local_test with #define FMT_HEADER_ONLY no problem.
But the build failed without FMT_HEADER_ONLY, the errors are:

2> locale-test.obj : error LNK2019: unresolved external symbol "struct fmt::v7::detail::dragonbox::decimal_fp __cdecl fmt::v7::detail::dragonbox::to_decimal(float)" (??$to_decimal@M@dragonbox@detail@v7@fmt@@ya?AU?$decimal_fp@M@0123@M@Z) referenced in function "class fmt::v7::detail::buffer_appender<wchar_t> __cdecl fmt::v7::detail::write<wchar_t,class fmt::v7::detail::buffer_appender<wchar_t>,float,0>(class fmt::v7::detail::buffer_appender<wchar_t>,float)" (??$write@_WV?$buffer_appender@_W@detail@v7@fmt@@m$0A@@detail@v7@fmt@@ya?AV?$buffer_appender@_W@012@V3012@M@Z)
2> locale-test.obj : error LNK2019: unresolved external symbol "struct fmt::v7::detail::dragonbox::decimal_fp __cdecl fmt::v7::detail::dragonbox::to_decimal(double)" (??$to_decimal@N@dragonbox@detail@v7@fmt@@ya?AU?$decimal_fp@N@0123@N@Z) referenced in function "class fmt::v7::detail::buffer_appender<wchar_t> __cdecl fmt::v7::detail::write<wchar_t,class fmt::v7::detail::buffer_appender<wchar_t>,double,0>(class fmt::v7::detail::buffer_appender<wchar_t>,double)" (??$write@_WV?$buffer_appender@_W@detail@v7@fmt@@n$0A@@detail@v7@fmt@@ya?AV?$buffer_appender@_W@012@V3012@N@Z)

Edit:
I found that the above symbols are required by other tests also, such as chrono-test, color-test, format-test, etc.
Exception: os-test gives this message:
os-test.obj : error LNK2001: unresolved external symbol "private: virtual void __cdecl fmt::v7::ostream::grow(unsigned __int64)" (?grow@ostream@v7@fmt@@EEAAX_K@Z)
1> D:\vcpkg\buildtrees\fmt\x64-windows\bin\Debug\os-test.exe : fatal error LNK1120: 1 unresolved externals

Please check.
I have intention to write to #1967 but it was closed.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions