-
Linux platform: There are several dynamic library(so), for example: libmy1.so, libmy2.so, ... libmy1.so, libmy2.so have no such API like "setup_logger" to setup sinks. logger.hpp
logger.cpp
Also provide macro in logger.hpp like:
All libraries linked to logger.hpp, and logger.cpp, such as: log libmy1 libmy2 Libraries print logger like:
@tt4g could you help me? Thank you so much. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 4 replies
-
I don't know what exactly you are having trouble doing. At least as previously answered, function bodies with singleton variables should not be listed in header files: #3171 (reply in thread) |
Beta Was this translation helpful? Give feedback.
This is because your library is still using header-only spdlog.
You must define the
SPDLOG_COMPILED_LIB
macro to use the shared library spdlog (duplicate #1470, #2494).