Fix build with "-fvisibility=hidden"

This commit is contained in:
LE GARREC Vincent 2021-11-25 00:16:28 +01:00
parent 2ab86a46d0
commit 58e2b455fb
No known key found for this signature in database
GPG Key ID: 137D307F58210ACE
2 changed files with 11 additions and 7 deletions

View File

@ -22,13 +22,17 @@
#ifdef SPDLOG_COMPILED_LIB
# undef SPDLOG_HEADER_ONLY
# if defined(_WIN32) && defined(SPDLOG_SHARED_LIB)
# if defined(SPDLOG_SHARED_LIB)
# if defined(_WIN32)
# ifdef spdlog_EXPORTS
# define SPDLOG_API __declspec(dllexport)
# else
# else // !spdlog_EXPORTS
# define SPDLOG_API __declspec(dllimport)
# endif
# else // !defined(_WIN32) || !defined(SPDLOG_SHARED_LIB)
# else // !defined(_WIN32)
# define SPDLOG_API __attribute__((visibility ("default")))
# endif
# else // !defined(SPDLOG_SHARED_LIB)
# define SPDLOG_API
# endif
# define SPDLOG_INLINE

View File

@ -16,7 +16,7 @@
namespace spdlog {
namespace sinks {
template<typename Mutex>
class base_sink : public sink
class SPDLOG_API base_sink : public sink
{
public:
base_sink();