mfontanini / cppkafka

Modern C++ Apache Kafka client library (wrapper for librdkafka)
BSD 2-Clause "Simplified" License
599 stars 207 forks source link

Windows - Build errors 64/32 #258

Open jeeftor opened 4 years ago

jeeftor commented 4 years ago

I've been using the linux lib without issues and am trying to port my code over to windows:

I believe I'm following (inspired by) the wiki directions ... and I've done the following to checkout project and libs (if this works I'll make a PR to the repo)

git clone https://github.com/mfontanini/cppkafka.git
cd cppkafka
curl -sq -k -o nuget.exe https://dist.nuget.org/win-x86-commandline/latest/nuget.exe
mkdir build
nuget install boost  -Version 1.72.0 -OutputDirectory build/packages
nuget install librdkafka.redist -Version 1.5.0 -OutputDirectory build/packages
cd build
cmake .. -DBoost_DEBUG=OFF -DBOOST_ROOT=C:\cppkafka\boost.1.72.0.0 -DBoost_NO_SYSTEM_PATHS=ON -DBOOST_INCLUDEDIR=C:\cppkafka\build\packages\boost.1.72.0.0\lib\native\include -DCPPKAFKA_CMAKE_VERBOSE=ON -DRdKafka_INCLUDE_DIR=C:\cppkafka\build\packages\librdkafka.redist.1.5.0\build\native\include -DRdKafka_LIBRARY_PATH=C:\cppkafka\build\packages\librdkafka.redist.1.5.0\build\native\lib\win\x64\win-x64-Release\v120
start CppKafka.sln

This then fires off VisualStudio 2019 - and when I build I'm ending up with a bunch of errors:

1>------ Build started: Project: cppkafka, Configuration: Debug x64 ------
1>backoff_performer.cpp
1>C:\cppkafka\include\cppkafka\metadata.h(80,35): warning C4251: 'cppkafka::PartitionMetadata::replicas_': class 'std::vector<int32_t,std::allocator<int32_t>>' needs to have dll-interface to be used by clients of class 'cppkafka::PartitionMetadata'
1>C:\cppkafka\include\cppkafka\metadata.h(70): message : see declaration of 'std::vector<int32_t,std::allocator<int32_t>>'
1>C:\cppkafka\include\cppkafka\metadata.h(81,31): warning C4251: 'cppkafka::PartitionMetadata::isrs_': class 'std::vector<int32_t,std::allocator<int32_t>>' needs to have dll-interface to be used by clients of class 'cppkafka::PartitionMetadata'
1>C:\cppkafka\include\cppkafka\metadata.h(70): message : see declaration of 'std::vector<int32_t,std::allocator<int32_t>>'
1>C:\cppkafka\include\cppkafka\metadata.h(106,22): warning C4251: 'cppkafka::TopicMetadata::name_': class 'std::basic_string<char,std::char_traits<char>,std::allocator<char>>' needs to have dll-interface to be used by clients of class 'cppkafka::TopicMetadata'
1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.26.28801\include\xstring(4575): message : see declaration of 'std::basic_string<char,std::char_traits<char>,std::allocator<char>>'
1>C:\cppkafka\include\cppkafka\metadata.h(108,47): warning C4251: 'cppkafka::TopicMetadata::partitions_': class 'std::vector<cppkafka::PartitionMetadata,std::allocator<cppkafka::PartitionMetadata>>' needs to have dll-interface to be used by clients of class 'cppkafka::TopicMetadata'
1>C:\cppkafka\include\cppkafka\metadata.h(104): message : see declaration of 'std::vector<cppkafka::PartitionMetadata,std::allocator<cppkafka::PartitionMetadata>>'
1>C:\cppkafka\include\cppkafka\metadata.h(133,28): warning C4251: 'cppkafka::BrokerMetadata::host_': class 'std::basic_string<char,std::char_traits<char>,std::allocator<char>>' needs to have dll-interface to be used by clients of class 'cppkafka::BrokerMetadata'
1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.26.28801\include\xstring(4575): message : see declaration of 'std::basic_string<char,std::char_traits<char>,std::allocator<char>>'
1>C:\cppkafka\include\cppkafka\metadata.h(202,22): warning C4251: 'cppkafka::Metadata::handle_': class 'std::unique_ptr<const rd_kafka_metadata_t,void (__cdecl *)(const rd_kafka_metadata *)>' needs to have dll-interface to be used by clients of class 'cppkafka::Metadata'
1>C:\cppkafka\include\cppkafka\metadata.h(196): message : see declaration of 'std::unique_ptr<const rd_kafka_metadata_t,void (__cdecl *)(const rd_kafka_metadata *)>'
1>C:\cppkafka\include\cppkafka\group_information.h(36,41): warning C4251: 'cppkafka::MemberAssignmentInformation::topic_partitions_': class 'std::vector<cppkafka::TopicPartition,std::allocator<cppkafka::TopicPartition>>' needs to have dll-interface to be used by clients of class 'cppkafka::MemberAssignmentInformation'
1>C:\cppkafka\include\cppkafka\topic_partition_list.h(51): message : see declaration of 'std::vector<cppkafka::TopicPartition,std::allocator<cppkafka::TopicPartition>>'
1>C:\cppkafka\include\cppkafka\group_information.h(76,27): warning C4251: 'cppkafka::GroupMemberInformation::member_id_': class 'std::basic_string<char,std::char_traits<char>,std::allocator<char>>' needs to have dll-interface to be used by clients of class 'cppkafka::GroupMemberInformation'
1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.26.28801\include\xstring(4575): message : see declaration of 'std::basic_string<char,std::char_traits<char>,std::allocator<char>>'
1>C:\cppkafka\include\cppkafka\group_information.h(77,27): warning C4251: 'cppkafka::GroupMemberInformation::client_id_': class 'std::basic_string<char,std::char_traits<char>,std::allocator<char>>' needs to have dll-interface to be used by clients of class 'cppkafka::GroupMemberInformation'
1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.26.28801\include\xstring(4575): message : see declaration of 'std::basic_string<char,std::char_traits<char>,std::allocator<char>>'
1>C:\cppkafka\include\cppkafka\group_information.h(78,29): warning C4251: 'cppkafka::GroupMemberInformation::client_host_': class 'std::basic_string<char,std::char_traits<char>,std::allocator<char>>' needs to have dll-interface to be used by clients of class 'cppkafka::GroupMemberInformation'
1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.26.28801\include\xstring(4575): message : see declaration of 'std::basic_string<char,std::char_traits<char>,std::allocator<char>>'
1>C:\cppkafka\include\cppkafka\group_information.h(79,42): warning C4251: 'cppkafka::GroupMemberInformation::member_metadata_': class 'std::vector<uint8_t,std::allocator<uint8_t>>' needs to have dll-interface to be used by clients of class 'cppkafka::GroupMemberInformation'
1>C:\cppkafka\include\cppkafka\group_information.h(23): message : see declaration of 'std::vector<uint8_t,std::allocator<uint8_t>>'
1>C:\cppkafka\include\cppkafka\group_information.h(80,44): warning C4251: 'cppkafka::GroupMemberInformation::member_assignment_': class 'std::vector<uint8_t,std::allocator<uint8_t>>' needs to have dll-interface to be used by clients of class 'cppkafka::GroupMemberInformation'
1>C:\cppkafka\include\cppkafka\group_information.h(23): message : see declaration of 'std::vector<uint8_t,std::allocator<uint8_t>>'
1>C:\cppkafka\include\cppkafka\group_information.h(131,22): warning C4251: 'cppkafka::GroupInformation::name_': class 'std::basic_string<char,std::char_traits<char>,std::allocator<char>>' needs to have dll-interface to be used by clients of class 'cppkafka::GroupInformation'
1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.26.28801\include\xstring(4575): message : see declaration of 'std::basic_string<char,std::char_traits<char>,std::allocator<char>>'
1>C:\cppkafka\include\cppkafka\group_information.h(133,23): warning C4251: 'cppkafka::GroupInformation::state_': class 'std::basic_string<char,std::char_traits<char>,std::allocator<char>>' needs to have dll-interface to be used by clients of class 'cppkafka::GroupInformation'
1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.26.28801\include\xstring(4575): message : see declaration of 'std::basic_string<char,std::char_traits<char>,std::allocator<char>>'
1>C:\cppkafka\include\cppkafka\group_information.h(134,31): warning C4251: 'cppkafka::GroupInformation::protocol_type_': class 'std::basic_string<char,std::char_traits<char>,std::allocator<char>>' needs to have dll-interface to be used by clients of class 'cppkafka::GroupInformation'
1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.26.28801\include\xstring(4575): message : see declaration of 'std::basic_string<char,std::char_traits<char>,std::allocator<char>>'
1>C:\cppkafka\include\cppkafka\group_information.h(135,26): warning C4251: 'cppkafka::GroupInformation::protocol_': class 'std::basic_string<char,std::char_traits<char>,std::allocator<char>>' needs to have dll-interface to be used by clients of class 'cppkafka::GroupInformation'
1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.26.28801\include\xstring(4575): message : see declaration of 'std::basic_string<char,std::char_traits<char>,std::allocator<char>>'
1>C:\cppkafka\include\cppkafka\group_information.h(136,49): warning C4251: 'cppkafka::GroupInformation::members_': class 'std::vector<cppkafka::GroupMemberInformation,std::allocator<cppkafka::GroupMemberInformation>>' needs to have dll-interface to be used by clients of class 'cppkafka::GroupInformation'
1>C:\cppkafka\include\cppkafka\group_information.h(128): message : see declaration of 'std::vector<cppkafka::GroupMemberInformation,std::allocator<cppkafka::GroupMemberInformation>>'
1>C:\cppkafka\include\cppkafka\topic_partition.h(140,23): warning C4251: 'cppkafka::TopicPartition::topic_': class 'std::basic_string<char,std::char_traits<char>,std::allocator<char>>' needs to have dll-interface to be used by clients of class 'cppkafka::TopicPartition'
1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.26.28801\include\xstring(4575): message : see declaration of 'std::basic_string<char,std::char_traits<char>,std::allocator<char>>'
1>C:\cppkafka\include\cppkafka\exceptions.h(44,54): warning C4275: non dll-interface class 'std::exception' used as base for dll-interface class 'cppkafka::Exception'
1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.26.28801\include\vcruntime_exception.h(48): message : see declaration of 'std::exception'
1>C:\cppkafka\include\cppkafka\exceptions.h(44): message : see declaration of 'cppkafka::Exception'
1>C:\cppkafka\include\cppkafka\exceptions.h(50,25): warning C4251: 'cppkafka::Exception::message_': class 'std::basic_string<char,std::char_traits<char>,std::allocator<char>>' needs to have dll-interface to be used by clients of class 'cppkafka::Exception'
1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.26.28801\include\xstring(4575): message : see declaration of 'std::basic_string<char,std::char_traits<char>,std::allocator<char>>'
1>C:\cppkafka\include\cppkafka\configuration_option.h(79,21): warning C4251: 'cppkafka::ConfigurationOption::key_': class 'std::basic_string<char,std::char_traits<char>,std::allocator<char>>' needs to have dll-interface to be used by clients of class 'cppkafka::ConfigurationOption'
1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.26.28801\include\xstring(4575): message : see declaration of 'std::basic_string<char,std::char_traits<char>,std::allocator<char>>'
1>C:\cppkafka\include\cppkafka\configuration_option.h(80,23): warning C4251: 'cppkafka::ConfigurationOption::value_': class 'std::basic_string<char,std::char_traits<char>,std::allocator<char>>' needs to have dll-interface to be used by clients of class 'cppkafka::ConfigurationOption'
1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.26.28801\include\xstring(4575): message : see declaration of 'std::basic_string<char,std::char_traits<char>,std::allocator<char>>'
1>C:\cppkafka\include\cppkafka\topic_configuration.h(142,22): warning C4251: 'cppkafka::TopicConfiguration::handle_': class 'cppkafka::ClonablePtr<rd_kafka_topic_conf_t,void (__cdecl *)(rd_kafka_topic_conf_t *),rd_kafka_topic_conf_t *(__cdecl *)(const rd_kafka_topic_conf_t *)>' needs to have dll-interface to be used by clients of class 'cppkafka::TopicConfiguration'
1>C:\cppkafka\include\cppkafka\topic_configuration.h(135): message : see declaration of 'cppkafka::ClonablePtr<rd_kafka_topic_conf_t,void (__cdecl *)(rd_kafka_topic_conf_t *),rd_kafka_topic_conf_t *(__cdecl *)(const rd_kafka_topic_conf_t *)>'
1>C:\cppkafka\include\cppkafka\topic_configuration.h(143,46): warning C4251: 'cppkafka::TopicConfiguration::partitioner_callback_': class 'std::function<int32_t (const cppkafka::Topic &,const cppkafka::Buffer &,int32_t)>' needs to have dll-interface to be used by clients of class 'cppkafka::TopicConfiguration'
1>C:\cppkafka\include\cppkafka\topic_configuration.h(64): message : see declaration of 'std::function<int32_t (const cppkafka::Topic &,const cppkafka::Buffer &,int32_t)>'
1>C:\cppkafka\include\cppkafka\message_timestamp.h(67,41): warning C4251: 'cppkafka::MessageTimestamp::timestamp_': class 'std::chrono::duration<__int64,std::milli>' needs to have dll-interface to be used by clients of class 'cppkafka::MessageTimestamp'
1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.26.28801\include\chrono(470): message : see declaration of 'std::chrono::duration<__int64,std::milli>'
1>C:\cppkafka\include\cppkafka\message.h(243,22): warning C4251: 'cppkafka::Message::handle_': class 'std::unique_ptr<rd_kafka_message_t,void (__cdecl *)(rd_kafka_message_t *)>' needs to have dll-interface to be used by clients of class 'cppkafka::Message'
1>C:\cppkafka\include\cppkafka\message.h(235): message : see declaration of 'std::unique_ptr<rd_kafka_message_t,void (__cdecl *)(rd_kafka_message_t *)>'
1>C:\cppkafka\include\cppkafka\message.h(247,32): warning C4251: 'cppkafka::Message::header_list_': class 'cppkafka::HeaderList<cppkafka::Header<cppkafka::Buffer>>' needs to have dll-interface to be used by clients of class 'cppkafka::Message'
1>C:\cppkafka\include\cppkafka\header_list.h(261): message : see declaration of 'cppkafka::HeaderList<cppkafka::Header<cppkafka::Buffer>>'
1>C:\cppkafka\include\cppkafka\message.h(250,26): warning C4251: 'cppkafka::Message::internal_': class 'std::shared_ptr<cppkafka::Internal>' needs to have dll-interface to be used by clients of class 'cppkafka::Message'
1>C:\cppkafka\include\cppkafka\message.h(62): message : see declaration of 'std::shared_ptr<cppkafka::Internal>'
1>C:\cppkafka\include\cppkafka\configuration.h(242,22): warning C4251: 'cppkafka::Configuration::handle_': class 'cppkafka::ClonablePtr<rd_kafka_conf_t,void (__cdecl *)(rd_kafka_conf_t *),rd_kafka_conf_t *(__cdecl *)(const rd_kafka_conf_t *)>' needs to have dll-interface to be used by clients of class 'cppkafka::Configuration'
1>C:\cppkafka\include\cppkafka\configuration.h(236): message : see declaration of 'cppkafka::ClonablePtr<rd_kafka_conf_t,void (__cdecl *)(rd_kafka_conf_t *),rd_kafka_conf_t *(__cdecl *)(const rd_kafka_conf_t *)>'
1>C:\cppkafka\include\cppkafka\configuration.h(243,62): warning C4251: 'cppkafka::Configuration::default_topic_config_': class 'boost::optional<cppkafka::TopicConfiguration>' needs to have dll-interface to be used by clients of class 'cppkafka::Configuration'
1>C:\cppkafka\include\cppkafka\configuration.h(229): message : see declaration of 'boost::optional<cppkafka::TopicConfiguration>'
1>C:\cppkafka\include\cppkafka\configuration.h(244,53): warning C4251: 'cppkafka::Configuration::delivery_report_callback_': class 'std::function<void (cppkafka::Producer &,const cppkafka::Message &)>' needs to have dll-interface to be used by clients of class 'cppkafka::Configuration'
1>C:\cppkafka\include\cppkafka\configuration.h(65): message : see declaration of 'std::function<void (cppkafka::Producer &,const cppkafka::Message &)>'
1>C:\cppkafka\include\cppkafka\configuration.h(245,49): warning C4251: 'cppkafka::Configuration::offset_commit_callback_': class 'std::function<void (cppkafka::Consumer &,cppkafka::Error,const cppkafka::TopicPartitionList &)>' needs to have dll-interface to be used by clients of class 'cppkafka::Configuration'
1>C:\cppkafka\include\cppkafka\configuration.h(66): message : see declaration of 'std::function<void (cppkafka::Consumer &,cppkafka::Error,const cppkafka::TopicPartitionList &)>'
1>C:\cppkafka\include\cppkafka\configuration.h(246,34): warning C4251: 'cppkafka::Configuration::error_callback_': class 'std::function<void (cppkafka::KafkaHandleBase &,int,const std::string &)>' needs to have dll-interface to be used by clients of class 'cppkafka::Configuration'
1>C:\cppkafka\include\cppkafka\configuration.h(69): message : see declaration of 'std::function<void (cppkafka::KafkaHandleBase &,int,const std::string &)>'
1>C:\cppkafka\include\cppkafka\configuration.h(247,40): warning C4251: 'cppkafka::Configuration::throttle_callback_': class 'std::function<void (cppkafka::KafkaHandleBase &,const std::string &,int32_t,std::chrono::milliseconds)>' needs to have dll-interface to be used by clients of class 'cppkafka::Configuration'
1>C:\cppkafka\include\cppkafka\configuration.h(72): message : see declaration of 'std::function<void (cppkafka::KafkaHandleBase &,const std::string &,int32_t,std::chrono::milliseconds)>'
1>C:\cppkafka\include\cppkafka\configuration.h(248,30): warning C4251: 'cppkafka::Configuration::log_callback_': class 'std::function<void (cppkafka::KafkaHandleBase &,int,const std::string &,const std::string &)>' needs to have dll-interface to be used by clients of class 'cppkafka::Configuration'
1>C:\cppkafka\include\cppkafka\configuration.h(76): message : see declaration of 'std::function<void (cppkafka::KafkaHandleBase &,int,const std::string &,const std::string &)>'
1>C:\cppkafka\include\cppkafka\configuration.h(249,34): warning C4251: 'cppkafka::Configuration::stats_callback_': class 'std::function<void (cppkafka::KafkaHandleBase &,const std::string &)>' needs to have dll-interface to be used by clients of class 'cppkafka::Configuration'
1>C:\cppkafka\include\cppkafka\configuration.h(80): message : see declaration of 'std::function<void (cppkafka::KafkaHandleBase &,const std::string &)>'
1>C:\cppkafka\include\cppkafka\configuration.h(250,36): warning C4251: 'cppkafka::Configuration::socket_callback_': class 'std::function<int (int,int,int)>' needs to have dll-interface to be used by clients of class 'cppkafka::Configuration'
1>C:\cppkafka\include\cppkafka\configuration.h(81): message : see declaration of 'std::function<int (int,int,int)>'
1>C:\cppkafka\include\cppkafka\configuration.h(251,55): warning C4251: 'cppkafka::Configuration::background_event_callback_': class 'std::function<void (cppkafka::KafkaHandleBase &,cppkafka::Event)>' needs to have dll-interface to be used by clients of class 'cppkafka::Configuration'
1>C:\cppkafka\include\cppkafka\configuration.h(82): message : see declaration of 'std::function<void (cppkafka::KafkaHandleBase &,cppkafka::Event)>'
1>C:\cppkafka\include\cppkafka\queue.h(228,59): warning C4251: 'cppkafka::Queue::DEFAULT_TIMEOUT': class 'std::chrono::duration<__int64,std::milli>' needs to have dll-interface to be used by clients of class 'cppkafka::Queue'
1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.26.28801\include\chrono(470): message : see declaration of 'std::chrono::duration<__int64,std::milli>'
1>C:\cppkafka\include\cppkafka\queue.h(237,40): warning C4251: 'cppkafka::Queue::handle_': class 'std::unique_ptr<rd_kafka_queue_t,void (__cdecl *)(rd_kafka_queue_t *)>' needs to have dll-interface to be used by clients of class 'cppkafka::Queue'
1>C:\cppkafka\include\cppkafka\queue.h(230): message : see declaration of 'std::unique_ptr<rd_kafka_queue_t,void (__cdecl *)(rd_kafka_queue_t *)>'
1>C:\cppkafka\include\cppkafka\queue.h(238,44): warning C4251: 'cppkafka::Queue::timeout_ms_': class 'std::chrono::duration<__int64,std::milli>' needs to have dll-interface to be used by clients of class 'cppkafka::Queue'
1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.26.28801\include\chrono(470): message : see declaration of 'std::chrono::duration<__int64,std::milli>'
1>C:\cppkafka\include\cppkafka\kafka_handle_base.h(370,59): warning C4251: 'cppkafka::KafkaHandleBase::DEFAULT_TIMEOUT': class 'std::chrono::duration<__int64,std::milli>' needs to have dll-interface to be used by clients of class 'cppkafka::KafkaHandleBase'
1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.26.28801\include\chrono(470): message : see declaration of 'std::chrono::duration<__int64,std::milli>'
1>C:\cppkafka\include\cppkafka\kafka_handle_base.h(390,42): warning C4251: 'cppkafka::KafkaHandleBase::timeout_ms_': class 'std::chrono::duration<__int64,std::milli>' needs to have dll-interface to be used by clients of class 'cppkafka::KafkaHandleBase'
1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.26.28801\include\chrono(470): message : see declaration of 'std::chrono::duration<__int64,std::milli>'
1>C:\cppkafka\include\cppkafka\kafka_handle_base.h(392,48): warning C4251: 'cppkafka::KafkaHandleBase::topic_configurations_': class 'std::unordered_map<std::string,cppkafka::TopicConfiguration,std::hash<std::string>,std::equal_to<std::string>,std::allocator<std::pair<const std::string,cppkafka::TopicConfiguration>>>' needs to have dll-interface to be used by clients of class 'cppkafka::KafkaHandleBase'
1>C:\cppkafka\include\cppkafka\kafka_handle_base.h(380): message : see declaration of 'std::unordered_map<std::string,cppkafka::TopicConfiguration,std::hash<std::string>,std::equal_to<std::string>,std::allocator<std::pair<const std::string,cppkafka::TopicConfiguration>>>'
1>C:\cppkafka\include\cppkafka\kafka_handle_base.h(393,43): warning C4251: 'cppkafka::KafkaHandleBase::topic_configurations_mutex_': class 'std::mutex' needs to have dll-interface to be used by clients of class 'cppkafka::KafkaHandleBase'
1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.26.28801\include\mutex(87): message : see declaration of 'std::mutex'
1>C:\cppkafka\include\cppkafka\kafka_handle_base.h(394,22): warning C4251: 'cppkafka::KafkaHandleBase::handle_': class 'std::unique_ptr<rd_kafka_t,cppkafka::KafkaHandleBase::HandleDeleter>' needs to have dll-interface to be used by clients of class 'cppkafka::KafkaHandleBase'
1>C:\cppkafka\include\cppkafka\kafka_handle_base.h(379): message : see declaration of 'std::unique_ptr<rd_kafka_t,cppkafka::KafkaHandleBase::HandleDeleter>'
1>C:\cppkafka\include\cppkafka\utils\../consumer.h(516,44): warning C4251: 'cppkafka::Consumer::assignment_callback_': class 'std::function<void (cppkafka::TopicPartitionList &)>' needs to have dll-interface to be used by clients of class 'cppkafka::Consumer'
1>C:\cppkafka\include\cppkafka\utils\../consumer.h(101): message : see declaration of 'std::function<void (cppkafka::TopicPartitionList &)>'
1>C:\cppkafka\include\cppkafka\utils\../consumer.h(517,44): warning C4251: 'cppkafka::Consumer::revocation_callback_': class 'std::function<void (const cppkafka::TopicPartitionList &)>' needs to have dll-interface to be used by clients of class 'cppkafka::Consumer'
1>C:\cppkafka\include\cppkafka\utils\../consumer.h(102): message : see declaration of 'std::function<void (const cppkafka::TopicPartitionList &)>'
1>C:\cppkafka\include\cppkafka\utils\../consumer.h(518,53): warning C4251: 'cppkafka::Consumer::rebalance_error_callback_': class 'std::function<void (cppkafka::Error)>' needs to have dll-interface to be used by clients of class 'cppkafka::Consumer'
1>C:\cppkafka\include\cppkafka\utils\../consumer.h(103): message : see declaration of 'std::function<void (cppkafka::Error)>'
1>C:\cppkafka\include\cppkafka\utils/backoff_performer.h(47,50): warning C4251: 'cppkafka::BackoffPerformer::DEFAULT_INITIAL_BACKOFF': class 'std::chrono::duration<__int64,std::milli>' needs to have dll-interface to be used by clients of class 'cppkafka::BackoffPerformer'
1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.26.28801\include\chrono(470): message : see declaration of 'std::chrono::duration<__int64,std::milli>'
1>C:\cppkafka\include\cppkafka\utils/backoff_performer.h(48,47): warning C4251: 'cppkafka::BackoffPerformer::DEFAULT_BACKOFF_STEP': class 'std::chrono::duration<__int64,std::milli>' needs to have dll-interface to be used by clients of class 'cppkafka::BackoffPerformer'
1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.26.28801\include\chrono(470): message : see declaration of 'std::chrono::duration<__int64,std::milli>'
1>C:\cppkafka\include\cppkafka\utils/backoff_performer.h(49,50): warning C4251: 'cppkafka::BackoffPerformer::DEFAULT_MAXIMUM_BACKOFF': class 'std::chrono::duration<__int64,std::milli>' needs to have dll-interface to be used by clients of class 'cppkafka::BackoffPerformer'
1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.26.28801\include\chrono(470): message : see declaration of 'std::chrono::duration<__int64,std::milli>'
1>C:\cppkafka\include\cppkafka\utils/backoff_performer.h(144,30): warning C4251: 'cppkafka::BackoffPerformer::initial_backoff_': class 'std::chrono::duration<__int64,std::milli>' needs to have dll-interface to be used by clients of class 'cppkafka::BackoffPerformer'
1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.26.28801\include\chrono(470): message : see declaration of 'std::chrono::duration<__int64,std::milli>'
1>C:\cppkafka\include\cppkafka\utils/backoff_performer.h(145,27): warning C4251: 'cppkafka::BackoffPerformer::backoff_step_': class 'std::chrono::duration<__int64,std::milli>' needs to have dll-interface to be used by clients of class 'cppkafka::BackoffPerformer'
1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.26.28801\include\chrono(470): message : see declaration of 'std::chrono::duration<__int64,std::milli>'
1>C:\cppkafka\include\cppkafka\utils/backoff_performer.h(146,30): warning C4251: 'cppkafka::BackoffPerformer::maximum_backoff_': class 'std::chrono::duration<__int64,std::milli>' needs to have dll-interface to be used by clients of class 'cppkafka::BackoffPerformer'
1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.26.28801\include\chrono(470): message : see declaration of 'std::chrono::duration<__int64,std::milli>'
1>C:\cppkafka\src\utils\backoff_performer.cpp(42,80): warning C4003: not enough arguments for function-like macro invocation 'max'
1>C:\cppkafka\src\utils\backoff_performer.cpp(42,80): error C2589: '(': illegal token on right side of '::'
1>C:\cppkafka\src\utils\backoff_performer.cpp(42): error C2062: type 'unknown-type' unexpected
1>C:\cppkafka\src\utils\backoff_performer.cpp(42,85): error C2143: syntax error: missing ';' before '}'
1>C:\cppkafka\src\utils\backoff_performer.cpp(44,35): error C2653: 'BackoffPerformer': is not a class or namespace name
1>C:\cppkafka\src\utils\backoff_performer.cpp(45,1): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>C:\cppkafka\src\utils\backoff_performer.cpp(45,20): error C2065: 'DEFAULT_INITIAL_BACKOFF': undeclared identifier
1>C:\cppkafka\src\utils\backoff_performer.cpp(46,17): error C2065: 'DEFAULT_BACKOFF_STEP': undeclared identifier
1>C:\cppkafka\src\utils\backoff_performer.cpp(46,57): error C2065: 'DEFAULT_MAXIMUM_BACKOFF': undeclared identifier
1>C:\cppkafka\src\utils\backoff_performer.cpp(47,32): error C2653: 'BackoffPolicy': is not a class or namespace name
1>C:\cppkafka\src\utils\backoff_performer.cpp(47,26): error C2065: 'LINEAR': undeclared identifier
1>C:\cppkafka\src\utils\backoff_performer.cpp(47,52): error C2065: 'DEFAULT_MAXIMUM_RETRIES': undeclared identifier
1>C:\cppkafka\src\utils\backoff_performer.cpp(47,77): error C2550: 'BackoffPerformer': constructor initializer lists are only allowed on constructor definitions
1>C:\cppkafka\src\utils\backoff_performer.cpp(49,1): warning C4508: 'BackoffPerformer': function should return a value; 'void' return type assumed
1>C:\cppkafka\src\utils\backoff_performer.cpp(51,42): error C2653: 'BackoffPerformer': is not a class or namespace name
1>C:\cppkafka\src\utils\backoff_performer.cpp(51,43): error C2065: 'BackoffPolicy': undeclared identifier
1>C:\cppkafka\src\utils\backoff_performer.cpp(51,57): error C2146: syntax error: missing ')' before identifier 'policy'
1>C:\cppkafka\src\utils\backoff_performer.cpp(51,65): error C2143: syntax error: missing ';' before '{'
1>C:\cppkafka\src\utils\backoff_performer.cpp(51,65): error C2447: '{': missing function header (old-style formal list?)
1>C:\cppkafka\src\utils\backoff_performer.cpp(55,43): error C2653: 'BackoffPerformer': is not a class or namespace name
1>C:\cppkafka\src\utils\backoff_performer.cpp(55,44): error C2065: 'TimeUnit': undeclared identifier
1>C:\cppkafka\src\utils\backoff_performer.cpp(55,53): error C2146: syntax error: missing ')' before identifier 'value'
1>C:\cppkafka\src\utils\backoff_performer.cpp(55,60): error C2143: syntax error: missing ';' before '{'
1>C:\cppkafka\src\utils\backoff_performer.cpp(55,60): error C2447: '{': missing function header (old-style formal list?)
1>C:\cppkafka\src\utils\backoff_performer.cpp(59,40): error C2653: 'BackoffPerformer': is not a class or namespace name
1>C:\cppkafka\src\utils\backoff_performer.cpp(59,41): error C2065: 'TimeUnit': undeclared identifier
1>C:\cppkafka\src\utils\backoff_performer.cpp(59,50): error C2146: syntax error: missing ')' before identifier 'value'
1>C:\cppkafka\src\utils\backoff_performer.cpp(59,57): error C2143: syntax error: missing ';' before '{'
1>C:\cppkafka\src\utils\backoff_performer.cpp(59,57): error C2447: '{': missing function header (old-style formal list?)
1>C:\cppkafka\src\utils\backoff_performer.cpp(63,43): error C2653: 'BackoffPerformer': is not a class or namespace name
1>C:\cppkafka\src\utils\backoff_performer.cpp(63,44): error C2065: 'TimeUnit': undeclared identifier
1>C:\cppkafka\src\utils\backoff_performer.cpp(63,53): error C2146: syntax error: missing ')' before identifier 'value'
1>C:\cppkafka\src\utils\backoff_performer.cpp(63,60): error C2143: syntax error: missing ';' before '{'
1>C:\cppkafka\src\utils\backoff_performer.cpp(63,60): error C2447: '{': missing function header (old-style formal list?)
1>C:\cppkafka\src\utils\backoff_performer.cpp(67,43): error C2653: 'BackoffPerformer': is not a class or namespace name
1>C:\cppkafka\src\utils\backoff_performer.cpp(68,5): error C2065: 'maximum_retries_': undeclared identifier
1>C:\cppkafka\src\utils\backoff_performer.cpp(71,28): error C2653: 'BackoffPerformer': is not a class or namespace name
1>C:\cppkafka\src\utils\backoff_performer.cpp(71,62): error C2653: 'BackoffPerformer': is not a class or namespace name
1>C:\cppkafka\src\utils\backoff_performer.cpp(71,62): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>C:\cppkafka\src\utils\backoff_performer.cpp(71,46): error C2146: syntax error: missing ';' before identifier 'increase_backoff'
1>C:\cppkafka\src\utils\backoff_performer.cpp(71,81): error C2143: syntax error: missing ';' before '{'
1>C:\cppkafka\src\utils\backoff_performer.cpp(71,81): error C2447: '{': missing function header (old-style formal list?)
1>C:\cppkafka\src\utils\backoff_performer.cpp(81,1): error C2059: syntax error: '}'
1>C:\cppkafka\src\utils\backoff_performer.cpp(81,1): error C2143: syntax error: missing ';' before '}'
1>roundrobin_poll_strategy.cpp
1>C:\cppkafka\include\cppkafka\utils\../exceptions.h(44,54): warning C4275: non dll-interface class 'std::exception' used as base for dll-interface class 'cppkafka::Exception'
1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.26.28801\include\vcruntime_exception.h(48): message : see declaration of 'std::exception'
1>C:\cppkafka\include\cppkafka\utils\../exceptions.h(44): message : see declaration of 'cppkafka::Exception'
1>C:\cppkafka\include\cppkafka\utils\../exceptions.h(50,25): warning C4251: 'cppkafka::Exception::message_': class 'std::basic_string<char,std::char_traits<char>,std::allocator<char>>' needs to have dll-interface to be used by clients of class 'cppkafka::Exception'
1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.26.28801\include\xstring(4575): message : see declaration of 'std::basic_string<char,std::char_traits<char>,std::allocator<char>>'
1>C:\cppkafka\include\cppkafka\metadata.h(80,35): warning C4251: 'cppkafka::PartitionMetadata::replicas_': class 'std::vector<int32_t,std::allocator<int32_t>>' needs to have dll-interface to be used by clients of class 'cppkafka::PartitionMetadata'
1>C:\cppkafka\include\cppkafka\metadata.h(70): message : see declaration of 'std::vector<int32_t,std::allocator<int32_t>>'
1>C:\cppkafka\include\cppkafka\metadata.h(81,31): warning C4251: 'cppkafka::PartitionMetadata::isrs_': class 'std::vector<int32_t,std::allocator<int32_t>>' needs to have dll-interface to be used by clients of class 'cppkafka::PartitionMetadata'
1>C:\cppkafka\include\cppkafka\metadata.h(70): message : see declaration of 'std::vector<int32_t,std::allocator<int32_t>>'
1>C:\cppkafka\include\cppkafka\metadata.h(106,22): warning C4251: 'cppkafka::TopicMetadata::name_': class 'std::basic_string<char,std::char_traits<char>,std::allocator<char>>' needs to have dll-interface to be used by clients of class 'cppkafka::TopicMetadata'
1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.26.28801\include\xstring(4575): message : see declaration of 'std::basic_string<char,std::char_traits<char>,std::allocator<char>>'
1>C:\cppkafka\include\cppkafka\metadata.h(108,47): warning C4251: 'cppkafka::TopicMetadata::partitions_': class 'std::vector<cppkafka::PartitionMetadata,std::allocator<cppkafka::PartitionMetadata>>' needs to have dll-interface to be used by clients of class 'cppkafka::TopicMetadata'
1>C:\cppkafka\include\cppkafka\metadata.h(104): message : see declaration of 'std::vector<cppkafka::PartitionMetadata,std::allocator<cppkafka::PartitionMetadata>>'
1>C:\cppkafka\include\cppkafka\metadata.h(133,28): warning C4251: 'cppkafka::BrokerMetadata::host_': class 'std::basic_string<char,std::char_traits<char>,std::allocator<char>>' needs to have dll-interface to be used by clients of class 'cppkafka::BrokerMetadata'
1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.26.28801\include\xstring(4575): message : see declaration of 'std::basic_string<char,std::char_traits<char>,std::allocator<char>>'
1>C:\cppkafka\include\cppkafka\metadata.h(202,22): warning C4251: 'cppkafka::Metadata::handle_': class 'std::unique_ptr<const rd_kafka_metadata_t,void (__cdecl *)(const rd_kafka_metadata *)>' needs to have dll-interface to be used by clients of class 'cppkafka::Metadata'
1>C:\cppkafka\include\cppkafka\metadata.h(196): message : see declaration of 'std::unique_ptr<const rd_kafka_metadata_t,void (__cdecl *)(const rd_kafka_metadata *)>'
1>C:\cppkafka\include\cppkafka\group_information.h(36,41): warning C4251: 'cppkafka::MemberAssignmentInformation::topic_partitions_': class 'std::vector<cppkafka::TopicPartition,std::allocator<cppkafka::TopicPartition>>' needs to have dll-interface to be used by clients of class 'cppkafka::MemberAssignmentInformation'
1>C:\cppkafka\include\cppkafka\topic_partition_list.h(51): message : see declaration of 'std::vector<cppkafka::TopicPartition,std::allocator<cppkafka::TopicPartition>>'
1>C:\cppkafka\include\cppkafka\group_information.h(76,27): warning C4251: 'cppkafka::GroupMemberInformation::member_id_': class 'std::basic_string<char,std::char_traits<char>,std::allocator<char>>' needs to have dll-interface to be used by clients of class 'cppkafka::GroupMemberInformation'
1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.26.28801\include\xstring(4575): message : see declaration of 'std::basic_string<char,std::char_traits<char>,std::allocator<char>>'
1>C:\cppkafka\include\cppkafka\group_information.h(77,27): warning C4251: 'cppkafka::GroupMemberInformation::client_id_': class 'std::basic_string<char,std::char_traits<char>,std::allocator<char>>' needs to have dll-interface to be used by clients of class 'cppkafka::GroupMemberInformation'
1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.26.28801\include\xstring(4575): message : see declaration of 'std::basic_string<char,std::char_traits<char>,std::allocator<char>>'
1>C:\cppkafka\include\cppkafka\group_information.h(78,29): warning C4251: 'cppkafka::GroupMemberInformation::client_host_': class 'std::basic_string<char,std::char_traits<char>,std::allocator<char>>' needs to have dll-interface to be used by clients of class 'cppkafka::GroupMemberInformation'
1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.26.28801\include\xstring(4575): message : see declaration of 'std::basic_string<char,std::char_traits<char>,std::allocator<char>>'
1>C:\cppkafka\include\cppkafka\group_information.h(79,42): warning C4251: 'cppkafka::GroupMemberInformation::member_metadata_': class 'std::vector<uint8_t,std::allocator<uint8_t>>' needs to have dll-interface to be used by clients of class 'cppkafka::GroupMemberInformation'
1>C:\cppkafka\include\cppkafka\group_information.h(23): message : see declaration of 'std::vector<uint8_t,std::allocator<uint8_t>>'
1>C:\cppkafka\include\cppkafka\group_information.h(80,44): warning C4251: 'cppkafka::GroupMemberInformation::member_assignment_': class 'std::vector<uint8_t,std::allocator<uint8_t>>' needs to have dll-interface to be used by clients of class 'cppkafka::GroupMemberInformation'
1>C:\cppkafka\include\cppkafka\group_information.h(23): message : see declaration of 'std::vector<uint8_t,std::allocator<uint8_t>>'
1>C:\cppkafka\include\cppkafka\group_information.h(131,22): warning C4251: 'cppkafka::GroupInformation::name_': class 'std::basic_string<char,std::char_traits<char>,std::allocator<char>>' needs to have dll-interface to be used by clients of class 'cppkafka::GroupInformation'
1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.26.28801\include\xstring(4575): message : see declaration of 'std::basic_string<char,std::char_traits<char>,std::allocator<char>>'
1>C:\cppkafka\include\cppkafka\group_information.h(133,23): warning C4251: 'cppkafka::GroupInformation::state_': class 'std::basic_string<char,std::char_traits<char>,std::allocator<char>>' needs to have dll-interface to be used by clients of class 'cppkafka::GroupInformation'
1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.26.28801\include\xstring(4575): message : see declaration of 'std::basic_string<char,std::char_traits<char>,std::allocator<char>>'
1>C:\cppkafka\include\cppkafka\group_information.h(134,31): warning C4251: 'cppkafka::GroupInformation::protocol_type_': class 'std::basic_string<char,std::char_traits<char>,std::allocator<char>>' needs to have dll-interface to be used by clients of class 'cppkafka::GroupInformation'
1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.26.28801\include\xstring(4575): message : see declaration of 'std::basic_string<char,std::char_traits<char>,std::allocator<char>>'
1>C:\cppkafka\include\cppkafka\group_information.h(135,26): warning C4251: 'cppkafka::GroupInformation::protocol_': class 'std::basic_string<char,std::char_traits<char>,std::allocator<char>>' needs to have dll-interface to be used by clients of class 'cppkafka::GroupInformation'
1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.26.28801\include\xstring(4575): message : see declaration of 'std::basic_string<char,std::char_traits<char>,std::allocator<char>>'
1>C:\cppkafka\include\cppkafka\group_information.h(136,49): warning C4251: 'cppkafka::GroupInformation::members_': class 'std::vector<cppkafka::GroupMemberInformation,std::allocator<cppkafka::GroupMemberInformation>>' needs to have dll-interface to be used by clients of class 'cppkafka::GroupInformation'
1>C:\cppkafka\include\cppkafka\group_information.h(128): message : see declaration of 'std::vector<cppkafka::GroupMemberInformation,std::allocator<cppkafka::GroupMemberInformation>>'
1>C:\cppkafka\include\cppkafka\topic_partition.h(140,23): warning C4251: 'cppkafka::TopicPartition::topic_': class 'std::basic_string<char,std::char_traits<char>,std::allocator<char>>' needs to have dll-interface to be used by clients of class 'cppkafka::TopicPartition'
1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.26.28801\include\xstring(4575): message : see declaration of 'std::basic_string<char,std::char_traits<char>,std::allocator<char>>'
1>C:\cppkafka\include\cppkafka\configuration_option.h(79,21): warning C4251: 'cppkafka::ConfigurationOption::key_': class 'std::basic_string<char,std::char_traits<char>,std::allocator<char>>' needs to have dll-interface to be used by clients of class 'cppkafka::ConfigurationOption'
1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.26.28801\include\xstring(4575): message : see declaration of 'std::basic_string<char,std::char_traits<char>,std::allocator<char>>'
1>C:\cppkafka\include\cppkafka\configuration_option.h(80,23): warning C4251: 'cppkafka::ConfigurationOption::value_': class 'std::basic_string<char,std::char_traits<char>,std::allocator<char>>' needs to have dll-interface to be used by clients of class 'cppkafka::ConfigurationOption'
1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.26.28801\include\xstring(4575): message : see declaration of 'std::basic_string<char,std::char_traits<char>,std::allocator<char>>'
1>C:\cppkafka\include\cppkafka\topic_configuration.h(142,22): warning C4251: 'cppkafka::TopicConfiguration::handle_': class 'cppkafka::ClonablePtr<rd_kafka_topic_conf_t,void (__cdecl *)(rd_kafka_topic_conf_t *),rd_kafka_topic_conf_t *(__cdecl *)(const rd_kafka_topic_conf_t *)>' needs to have dll-interface to be used by clients of class 'cppkafka::TopicConfiguration'
1>C:\cppkafka\include\cppkafka\topic_configuration.h(135): message : see declaration of 'cppkafka::ClonablePtr<rd_kafka_topic_conf_t,void (__cdecl *)(rd_kafka_topic_conf_t *),rd_kafka_topic_conf_t *(__cdecl *)(const rd_kafka_topic_conf_t *)>'
1>C:\cppkafka\include\cppkafka\topic_configuration.h(143,46): warning C4251: 'cppkafka::TopicConfiguration::partitioner_callback_': class 'std::function<int32_t (const cppkafka::Topic &,const cppkafka::Buffer &,int32_t)>' needs to have dll-interface to be used by clients of class 'cppkafka::TopicConfiguration'
1>C:\cppkafka\include\cppkafka\topic_configuration.h(64): message : see declaration of 'std::function<int32_t (const cppkafka::Topic &,const cppkafka::Buffer &,int32_t)>'
1>C:\cppkafka\include\cppkafka\message_timestamp.h(67,41): warning C4251: 'cppkafka::MessageTimestamp::timestamp_': class 'std::chrono::duration<__int64,std::milli>' needs to have dll-interface to be used by clients of class 'cppkafka::MessageTimestamp'
1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.26.28801\include\chrono(470): message : see declaration of 'std::chrono::duration<__int64,std::milli>'
1>C:\cppkafka\include\cppkafka\message.h(243,22): warning C4251: 'cppkafka::Message::handle_': class 'std::unique_ptr<rd_kafka_message_t,void (__cdecl *)(rd_kafka_message_t *)>' needs to have dll-interface to be used by clients of class 'cppkafka::Message'
1>C:\cppkafka\include\cppkafka\message.h(235): message : see declaration of 'std::unique_ptr<rd_kafka_message_t,void (__cdecl *)(rd_kafka_message_t *)>'
1>C:\cppkafka\include\cppkafka\message.h(247,32): warning C4251: 'cppkafka::Message::header_list_': class 'cppkafka::HeaderList<cppkafka::Header<cppkafka::Buffer>>' needs to have dll-interface to be used by clients of class 'cppkafka::Message'
1>C:\cppkafka\include\cppkafka\header_list.h(261): message : see declaration of 'cppkafka::HeaderList<cppkafka::Header<cppkafka::Buffer>>'
1>C:\cppkafka\include\cppkafka\message.h(250,26): warning C4251: 'cppkafka::Message::internal_': class 'std::shared_ptr<cppkafka::Internal>' needs to have dll-interface to be used by clients of class 'cppkafka::Message'
1>C:\cppkafka\include\cppkafka\message.h(62): message : see declaration of 'std::shared_ptr<cppkafka::Internal>'
1>C:\cppkafka\include\cppkafka\configuration.h(242,22): warning C4251: 'cppkafka::Configuration::handle_': class 'cppkafka::ClonablePtr<rd_kafka_conf_t,void (__cdecl *)(rd_kafka_conf_t *),rd_kafka_conf_t *(__cdecl *)(const rd_kafka_conf_t *)>' needs to have dll-interface to be used by clients of class 'cppkafka::Configuration'
1>C:\cppkafka\include\cppkafka\configuration.h(236): message : see declaration of 'cppkafka::ClonablePtr<rd_kafka_conf_t,void (__cdecl *)(rd_kafka_conf_t *),rd_kafka_conf_t *(__cdecl *)(const rd_kafka_conf_t *)>'
1>C:\cppkafka\include\cppkafka\configuration.h(243,62): warning C4251: 'cppkafka::Configuration::default_topic_config_': class 'boost::optional<cppkafka::TopicConfiguration>' needs to have dll-interface to be used by clients of class 'cppkafka::Configuration'
1>C:\cppkafka\include\cppkafka\configuration.h(229): message : see declaration of 'boost::optional<cppkafka::TopicConfiguration>'
1>C:\cppkafka\include\cppkafka\configuration.h(244,53): warning C4251: 'cppkafka::Configuration::delivery_report_callback_': class 'std::function<void (cppkafka::Producer &,const cppkafka::Message &)>' needs to have dll-interface to be used by clients of class 'cppkafka::Configuration'
1>C:\cppkafka\include\cppkafka\configuration.h(65): message : see declaration of 'std::function<void (cppkafka::Producer &,const cppkafka::Message &)>'
1>C:\cppkafka\include\cppkafka\configuration.h(245,49): warning C4251: 'cppkafka::Configuration::offset_commit_callback_': class 'std::function<void (cppkafka::Consumer &,cppkafka::Error,const cppkafka::TopicPartitionList &)>' needs to have dll-interface to be used by clients of class 'cppkafka::Configuration'
1>C:\cppkafka\include\cppkafka\configuration.h(66): message : see declaration of 'std::function<void (cppkafka::Consumer &,cppkafka::Error,const cppkafka::TopicPartitionList &)>'
1>C:\cppkafka\include\cppkafka\configuration.h(246,34): warning C4251: 'cppkafka::Configuration::error_callback_': class 'std::function<void (cppkafka::KafkaHandleBase &,int,const std::string &)>' needs to have dll-interface to be used by clients of class 'cppkafka::Configuration'
1>C:\cppkafka\include\cppkafka\configuration.h(69): message : see declaration of 'std::function<void (cppkafka::KafkaHandleBase &,int,const std::string &)>'
1>C:\cppkafka\include\cppkafka\configuration.h(247,40): warning C4251: 'cppkafka::Configuration::throttle_callback_': class 'std::function<void (cppkafka::KafkaHandleBase &,const std::string &,int32_t,std::chrono::milliseconds)>' needs to have dll-interface to be used by clients of class 'cppkafka::Configuration'
1>C:\cppkafka\include\cppkafka\configuration.h(72): message : see declaration of 'std::function<void (cppkafka::KafkaHandleBase &,const std::string &,int32_t,std::chrono::milliseconds)>'
1>C:\cppkafka\include\cppkafka\configuration.h(248,30): warning C4251: 'cppkafka::Configuration::log_callback_': class 'std::function<void (cppkafka::KafkaHandleBase &,int,const std::string &,const std::string &)>' needs to have dll-interface to be used by clients of class 'cppkafka::Configuration'
1>C:\cppkafka\include\cppkafka\configuration.h(76): message : see declaration of 'std::function<void (cppkafka::KafkaHandleBase &,int,const std::string &,const std::string &)>'
1>C:\cppkafka\include\cppkafka\configuration.h(249,34): warning C4251: 'cppkafka::Configuration::stats_callback_': class 'std::function<void (cppkafka::KafkaHandleBase &,const std::string &)>' needs to have dll-interface to be used by clients of class 'cppkafka::Configuration'
1>C:\cppkafka\include\cppkafka\configuration.h(80): message : see declaration of 'std::function<void (cppkafka::KafkaHandleBase &,const std::string &)>'
1>C:\cppkafka\include\cppkafka\configuration.h(250,36): warning C4251: 'cppkafka::Configuration::socket_callback_': class 'std::function<int (int,int,int)>' needs to have dll-interface to be used by clients of class 'cppkafka::Configuration'
1>C:\cppkafka\include\cppkafka\configuration.h(81): message : see declaration of 'std::function<int (int,int,int)>'
1>C:\cppkafka\include\cppkafka\configuration.h(251,55): warning C4251: 'cppkafka::Configuration::background_event_callback_': class 'std::function<void (cppkafka::KafkaHandleBase &,cppkafka::Event)>' needs to have dll-interface to be used by clients of class 'cppkafka::Configuration'
1>C:\cppkafka\include\cppkafka\configuration.h(82): message : see declaration of 'std::function<void (cppkafka::KafkaHandleBase &,cppkafka::Event)>'
1>C:\cppkafka\include\cppkafka\queue.h(228,59): warning C4251: 'cppkafka::Queue::DEFAULT_TIMEOUT': class 'std::chrono::duration<__int64,std::milli>' needs to have dll-interface to be used by clients of class 'cppkafka::Queue'
1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.26.28801\include\chrono(470): message : see declaration of 'std::chrono::duration<__int64,std::milli>'
1>C:\cppkafka\include\cppkafka\queue.h(237,40): warning C4251: 'cppkafka::Queue::handle_': class 'std::unique_ptr<rd_kafka_queue_t,void (__cdecl *)(rd_kafka_queue_t *)>' needs to have dll-interface to be used by clients of class 'cppkafka::Queue'
1>C:\cppkafka\include\cppkafka\queue.h(230): message : see declaration of 'std::unique_ptr<rd_kafka_queue_t,void (__cdecl *)(rd_kafka_queue_t *)>'
1>C:\cppkafka\include\cppkafka\queue.h(238,44): warning C4251: 'cppkafka::Queue::timeout_ms_': class 'std::chrono::duration<__int64,std::milli>' needs to have dll-interface to be used by clients of class 'cppkafka::Queue'
1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.26.28801\include\chrono(470): message : see declaration of 'std::chrono::duration<__int64,std::milli>'
1>C:\cppkafka\include\cppkafka\kafka_handle_base.h(370,59): warning C4251: 'cppkafka::KafkaHandleBase::DEFAULT_TIMEOUT': class 'std::chrono::duration<__int64,std::milli>' needs to have dll-interface to be used by clients of class 'cppkafka::KafkaHandleBase'
1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.26.28801\include\chrono(470): message : see declaration of 'std::chrono::duration<__int64,std::milli>'
1>C:\cppkafka\include\cppkafka\kafka_handle_base.h(390,42): warning C4251: 'cppkafka::KafkaHandleBase::timeout_ms_': class 'std::chrono::duration<__int64,std::milli>' needs to have dll-interface to be used by clients of class 'cppkafka::KafkaHandleBase'
1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.26.28801\include\chrono(470): message : see declaration of 'std::chrono::duration<__int64,std::milli>'
1>C:\cppkafka\include\cppkafka\kafka_handle_base.h(392,48): warning C4251: 'cppkafka::KafkaHandleBase::topic_configurations_': class 'std::unordered_map<std::string,cppkafka::TopicConfiguration,std::hash<std::string>,std::equal_to<std::string>,std::allocator<std::pair<const std::string,cppkafka::TopicConfiguration>>>' needs to have dll-interface to be used by clients of class 'cppkafka::KafkaHandleBase'
1>C:\cppkafka\include\cppkafka\kafka_handle_base.h(380): message : see declaration of 'std::unordered_map<std::string,cppkafka::TopicConfiguration,std::hash<std::string>,std::equal_to<std::string>,std::allocator<std::pair<const std::string,cppkafka::TopicConfiguration>>>'
1>C:\cppkafka\include\cppkafka\kafka_handle_base.h(393,43): warning C4251: 'cppkafka::KafkaHandleBase::topic_configurations_mutex_': class 'std::mutex' needs to have dll-interface to be used by clients of class 'cppkafka::KafkaHandleBase'
1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.26.28801\include\mutex(87): message : see declaration of 'std::mutex'
1>C:\cppkafka\include\cppkafka\kafka_handle_base.h(394,22): warning C4251: 'cppkafka::KafkaHandleBase::handle_': class 'std::unique_ptr<rd_kafka_t,cppkafka::KafkaHandleBase::HandleDeleter>' needs to have dll-interface to be used by clients of class 'cppkafka::KafkaHandleBase'
1>C:\cppkafka\include\cppkafka\kafka_handle_base.h(379): message : see declaration of 'std::unique_ptr<rd_kafka_t,cppkafka::KafkaHandleBase::HandleDeleter>'
1>C:\cppkafka\include\cppkafka\utils\../consumer.h(516,44): warning C4251: 'cppkafka::Consumer::assignment_callback_': class 'std::function<void (cppkafka::TopicPartitionList &)>' needs to have dll-interface to be used by clients of class 'cppkafka::Consumer'
1>C:\cppkafka\include\cppkafka\utils\../consumer.h(101): message : see declaration of 'std::function<void (cppkafka::TopicPartitionList &)>'
1>C:\cppkafka\include\cppkafka\utils\../consumer.h(517,44): warning C4251: 'cppkafka::Consumer::revocation_callback_': class 'std::function<void (const cppkafka::TopicPartitionList &)>' needs to have dll-interface to be used by clients of class 'cppkafka::Consumer'
1>C:\cppkafka\include\cppkafka\utils\../consumer.h(102): message : see declaration of 'std::function<void (const cppkafka::TopicPartitionList &)>'
1>C:\cppkafka\include\cppkafka\utils\../consumer.h(518,53): warning C4251: 'cppkafka::Consumer::rebalance_error_callback_': class 'std::function<void (cppkafka::Error)>' needs to have dll-interface to be used by clients of class 'cppkafka::Consumer'
1>C:\cppkafka\include\cppkafka\utils\../consumer.h(103): message : see declaration of 'std::function<void (cppkafka::Error)>'
1>C:\cppkafka\include\cppkafka\utils\poll_strategy_base.h(56,60): warning C4275: non dll-interface struct 'cppkafka::PollInterface' used as base for dll-interface class 'cppkafka::PollStrategyBase'
1>C:\cppkafka\include\cppkafka\utils\poll_interface.h(42): message : see declaration of 'cppkafka::PollInterface'
1>C:\cppkafka\include\cppkafka\utils\poll_strategy_base.h(56): message : see declaration of 'cppkafka::PollStrategyBase'
1>C:\cppkafka\include\cppkafka\utils\poll_strategy_base.h(173,58): warning C4251: 'cppkafka::PollStrategyBase::partition_queues_': class 'std::map<cppkafka::TopicPartition,cppkafka::QueueData,std::less<cppkafka::TopicPartition>,std::allocator<std::pair<const cppkafka::TopicPartition,cppkafka::QueueData>>>' needs to have dll-interface to be used by clients of class 'cppkafka::PollStrategyBase'
1>C:\cppkafka\include\cppkafka\utils\poll_strategy_base.h(58): message : see declaration of 'std::map<cppkafka::TopicPartition,cppkafka::QueueData,std::less<cppkafka::TopicPartition>,std::allocator<std::pair<const cppkafka::TopicPartition,cppkafka::QueueData>>>'
1>C:\cppkafka\include\cppkafka\utils\poll_strategy_base.h(174,61): warning C4251: 'cppkafka::PollStrategyBase::assignment_callback_': class 'std::function<void (cppkafka::TopicPartitionList &)>' needs to have dll-interface to be used by clients of class 'cppkafka::PollStrategyBase'
1>C:\cppkafka\include\cppkafka\utils\../consumer.h(101): message : see declaration of 'std::function<void (cppkafka::TopicPartitionList &)>'
1>C:\cppkafka\include\cppkafka\utils\poll_strategy_base.h(175,61): warning C4251: 'cppkafka::PollStrategyBase::revocation_callback_': class 'std::function<void (const cppkafka::TopicPartitionList &)>' needs to have dll-interface to be used by clients of class 'cppkafka::PollStrategyBase'
1>C:\cppkafka\include\cppkafka\utils\../consumer.h(102): message : see declaration of 'std::function<void (const cppkafka::TopicPartitionList &)>'
1>C:\cppkafka\include\cppkafka\utils\poll_strategy_base.h(176,66): warning C4251: 'cppkafka::PollStrategyBase::rebalance_error_callback_': class 'std::function<void (cppkafka::Error)>' needs to have dll-interface to be used by clients of class 'cppkafka::PollStrategyBase'
1>C:\cppkafka\include\cppkafka\utils\../consumer.h(103): message : see declaration of 'std::function<void (cppkafka::Error)>'
1>Generating Code...
1>Done building project "cppkafka.vcxproj" -- FAILED.
2>------ Build started: Project: ALL_BUILD, Configuration: Debug x64 ------
2>Building Custom Rule C:/cppkafka/CMakeLists.txt
========== Build: 1 succeeded, 1 failed, 1 up-to-date, 0 skipped ==========

So the first thing that jumps to mind is I'm pointing at a .lib file and its calling out:

1>C:\cppkafka\include\cppkafka\metadata.h(80,35): warning C4251: 'cppkafka::PartitionMetadata::replicas_': class 'std::vector<int32_t,std::allocator>' needs to have dll-interface to be used by clients of class 'cppkafka::PartitionMetadata'

which makes me think I need to swap over to the dll? perhaps

However some of the other errors are confusing.

Any help appreciated.

Thanks

jeeftor commented 4 years ago

Switched to Visual Studio 2017 and it worked:

Open power shell (admin mode)

Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))

choco install https://chocolatey.org/packages/VisualStudio2017Community

Then open a dev terminal:


cd \
#git clone https://github.com/Microsoft/vcpkg.git
git config --global http.sslVerify false
git clone https://github.com/mfontanini/cppkafka.git
cd cppkafka
curl -sq -k -o nuget.exe https://dist.nuget.org/win-x86-commandline/latest/nuget.exe
mkdir build
nuget install boost  -Version 1.72.0 -OutputDirectory build/packages
nuget install librdkafka.redist -Version 1.5.0 -OutputDirectory build/packages
cd build
cmake .. -DBoost_DEBUG=OFF -DBOOST_ROOT=C:\cppkafka\build\packages\boost.1.72.0.0 -DBoost_NO_SYSTEM_PATHS=ON -DBOOST_INCLUDEDIR=C:\cppkafka\build\packages\boost.1.72.0.0\lib\native\include -DCPPKAFKA_CMAKE_VERBOSE=OFF -DRdKafka_INCLUDE_DIR=C:\cppkafka\build\packages\librdkafka.redist.1.5.0\build\native\include -DRdKafka_LIBRARY_PATH=C:\cppkafka\build\packages\librdkafka.redist.1.5.0\runtimes\win-x64\native
start CppKafka.sln
jeeftor commented 4 years ago

I found an issue when using the Win64 generator:

git config --global http.sslVerify false
git clone https://github.com/mfontanini/cppkafka.git
cd cppkafka
curl -sq -k -o nuget.exe https://dist.nuget.org/win-x86-commandline/latest/nuget.exe
mkdir build
nuget install boost  -Version 1.72.0 -OutputDirectory build/packages
nuget install librdkafka.redist -Version 1.5.0 -OutputDirectory build/packages
cd build
cmake .. -DBoost_DEBUG=OFF -DBOOST_ROOT=C:\cppkafka\build\packages\boost.1.72.0.0 -DBoost_NO_SYSTEM_PATHS=ON -DBOOST_INCLUDEDIR=C:\cppkafka\build\packages\boost.1.72.0.0\lib\native\include -DCPPKAFKA_CMAKE_VERBOSE=OFF -DRdKafka_INCLUDE_DIR=C:\cppkafka\build\packages\librdkafka.redist.1.5.0\build\native\include -DRdKafka_LIBRARY_PATH=C:\cppkafka\build\packages\librdkafka.redist.1.5.0\runtimes\win-x64\native -G "Visual Studio 15 2017 Win64"
start CppKafka.sln

This version compiles with errors...

FedericoLaurianti-ScaiConsulting commented 4 years ago

For me works if I add to cmake options: -DCPPKAFKA_BUILD_SHARED=OFF

And I edit: C:\cppkafka\CMakeLists.txt

Adding this line: add_definitions("-DNOMINMAX=1")

Could someone give me an explanation about this last?