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
I'm just trying to upgrade from v1.3 to v1.4.2 with bundled FMT library.
While compiling the new version msvc compiler noticed that a method is compiled in multiple translation units. This is due to spdlog/fmt/ostr.h defining FMT_HEADER_ONLY. If I include spdlog/fmt/ostr.h before all other spdlog includes then it's like I've defined FMT_HEADER_ONLY although I haven't. If it's the last include then everything is fine.
Thank you for this amazing logger btw.
(Link target) ->
spdlog.lib(fmt.obj) : error LNK2005: "public: virtual __cdecl fmt::v6::format_error::~format_error(void)" (??1format_error@v6@fmt@@UEAA@XZ) already defined in main.obj [path_to_project.vcxproj]
spdlog.lib(fmt.obj) : error LNK2005: "public: void __cdecl fmt::v6::internal::error_handler::on_error(char const *)" (?on_error@error_handler@internal@v6@fmt@@QEAAXPEBD@Z) already defined in main.obj [path_to_project.vcxproj]
path_to_bin.exe : fatal error LNK1169: one or more multiply defined symbols found [path_to_project.vcxproj]
Thanks,
Peter
The text was updated successfully, but these errors were encountered:
I tried to create a small example too that reproduces the issue but failed to.
Good news is that your changes seem to fix the issue where it originally occurred. Thanks
Hi,
I'm just trying to upgrade from v1.3 to v1.4.2 with bundled FMT library.
While compiling the new version msvc compiler noticed that a method is compiled in multiple translation units. This is due to spdlog/fmt/ostr.h defining FMT_HEADER_ONLY. If I include spdlog/fmt/ostr.h before all other spdlog includes then it's like I've defined FMT_HEADER_ONLY although I haven't. If it's the last include then everything is fine.
Thank you for this amazing logger btw.
Thanks,
Peter
The text was updated successfully, but these errors were encountered: