-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
fmt shared build lacking symbols #2011
Comments
Fixed in 6d14f78, thanks for reporting. |
I have found another issue not about missing symbols but redundant symbols.
|
|
Yes I am using CMake to generate MSVC project files. |
I found the cause of redundant symbols. It was introduced in your commit 6d14f78
Removing FMT_API from the declaration in os.h and "grow()" in os.cpp will solved the issue. |
Thanks for investigating. The issue is tentatively fixed in 5555651. |
I have just upgraded fmt-7x to fmt-8.x and found that the "redundant symbols" bug is appeared again. |
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.
The text was updated successfully, but these errors were encountered: