Ship a library with spdlog, link against an app that already use spdlog. #1937
Unanswered
simone-gaia
asked this question in
Q&A
Replies: 1 comment 1 reply
-
If there is no application binary compatibility between two spdlog, undefined behavior is expected to occur at runtime. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello, I have the following scenario: We are building a library that, amongst other things, provides a logger, which internally uses spdlog. We use the logger both to log internal stuff and to let our users log from their app. Our library is statically compiled, hence part of spdlog is statically compiled into it.
Now let's assume a user of our library already uses spdlog, or use another library that uses spdlog (eg. ros2). There can be a version mismatch between "our" spdlog and "their" spdlog, which can cause trouble (anything from SEGFAULT to weird behavior in the configuration of the logger).
I wonder if there is some best practice around this scenario or if what I'm doing is completely wrong.
Thanks.
Beta Was this translation helpful? Give feedback.
All reactions