From 2b66fd3a22a0b33458a27029df55cd8bca10cc7c Mon Sep 17 00:00:00 2001 From: multiprogramm Date: Wed, 17 Oct 2018 20:43:33 +0300 Subject: [PATCH] Fix windows linker errors (#120) --- include/cppkafka/message_internal.h | 3 ++- include/cppkafka/utils/backoff_committer.h | 3 ++- include/cppkafka/utils/compacted_topic_processor.h | 3 ++- include/cppkafka/utils/poll_strategy_base.h | 3 ++- 4 files changed, 8 insertions(+), 4 deletions(-) diff --git a/include/cppkafka/message_internal.h b/include/cppkafka/message_internal.h index 06e9953..f6b97c7 100644 --- a/include/cppkafka/message_internal.h +++ b/include/cppkafka/message_internal.h @@ -31,6 +31,7 @@ #define CPPKAFKA_MESSAGE_INTERNAL_H #include +#include "macros.h" namespace cppkafka { @@ -45,7 +46,7 @@ using InternalPtr = std::shared_ptr; /** * \brief Private message data structure */ -class MessageInternal { +class CPPKAFKA_API MessageInternal { public: MessageInternal(void* user_data, std::shared_ptr internal); static std::unique_ptr load(Message& message); diff --git a/include/cppkafka/utils/backoff_committer.h b/include/cppkafka/utils/backoff_committer.h index d54f2e8..5224980 100644 --- a/include/cppkafka/utils/backoff_committer.h +++ b/include/cppkafka/utils/backoff_committer.h @@ -37,6 +37,7 @@ #include "../consumer.h" #include "backoff_performer.h" #include "../detail/callback_invoker.h" +#include "../macros.h" namespace cppkafka { @@ -71,7 +72,7 @@ namespace cppkafka { * committer.commit(some_message); * \endcode */ -class BackoffCommitter : public BackoffPerformer { +class CPPKAFKA_API BackoffCommitter : public BackoffPerformer { public: /** * \brief The error callback. diff --git a/include/cppkafka/utils/compacted_topic_processor.h b/include/cppkafka/utils/compacted_topic_processor.h index 3c06b8b..166dcfe 100644 --- a/include/cppkafka/utils/compacted_topic_processor.h +++ b/include/cppkafka/utils/compacted_topic_processor.h @@ -37,6 +37,7 @@ #include #include "../buffer.h" #include "../consumer.h" +#include "../macros.h" namespace cppkafka { /** @@ -110,7 +111,7 @@ private: }; template -class CompactedTopicProcessor { +class CPPKAFKA_API CompactedTopicProcessor { public: /** * The type of events generated by this processor diff --git a/include/cppkafka/utils/poll_strategy_base.h b/include/cppkafka/utils/poll_strategy_base.h index 0cf6d88..6a13946 100644 --- a/include/cppkafka/utils/poll_strategy_base.h +++ b/include/cppkafka/utils/poll_strategy_base.h @@ -35,6 +35,7 @@ #include "../queue.h" #include "../topic_partition_list.h" #include "poll_interface.h" +#include "../macros.h" namespace cppkafka { @@ -52,7 +53,7 @@ struct QueueData { * * \brief Base implementation of the PollInterface */ -class PollStrategyBase : public PollInterface { +class CPPKAFKA_API PollStrategyBase : public PollInterface { public: using QueueMap = std::map;