We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
When using spdlog as a compiled library in a project, trying to use spdlog_setup will result in multiply defined symbols linker errors:
spdlog.lib(fmt.cpp.obj) : error LNK2005: "public: virtual __cdecl fmt::v6::format_error::~format_error(void)" (??1format_error@v6@fmt@@UEAA@XZ) already defined in core_application.cpp.obj
This led me to fmtlib/fmt#372 (comment) which in turn led me to look for this in spdlog_setup sources.
In conf_impl.h, changing
#ifndef FMT_HEADER_ONLY #define FMT_HEADER_ONLY #endif
to
#if !defined(SPDLOG_COMPILED_LIB) && !defined(FMT_HEADER_ONLY) #define FMT_HEADER_ONLY #endif
seems to correctly not set FMT_HEADER_ONLY and allows linking on windows.
The text was updated successfully, but these errors were encountered:
Avoid multiply defined symbols linker errors
0488b2b
When using spdlog_setup with a compiled spdlog library. Fixes guangie88#74.
Successfully merging a pull request may close this issue.
When using spdlog as a compiled library in a project, trying to use spdlog_setup will result in multiply defined symbols linker errors:
This led me to fmtlib/fmt#372 (comment) which in turn led me to look for this in spdlog_setup sources.
In conf_impl.h, changing
to
seems to correctly not set FMT_HEADER_ONLY and allows linking on windows.
The text was updated successfully, but these errors were encountered: