Open apachexc opened 1 year ago
我都是Linux环境开发,没有在Windows环境测试过,建议你使用最新的库版本
---- 回复的原邮件 ---- | 发件人 | @.> | | 日期 | 2023年05月30日 17:34 | | 收件人 | @.> | | 抄送至 | @.***> | | 主题 | [aywfelix/Kafka-cpp] librdkafka 库是 2.1.1版本吗? (Issue #2) |
代码有内存有异常,在librdkafka2.1.1,windows c++ 环境下。 linux下正常
— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you are subscribed to this thread.Message ID: @.***>
我用的是最新的库。 linux 下的java , c++ 都没问题了,
就是 windows下报错。
bool KafkaProducer::Init(const std::string& host, const int port, bool async, const int maxsize)
{
m_run = true;
m_conf = std::shared_ptr
m_deliverycb = std::shared_ptr<DeliveryReportCB>(new DeliveryReportCB);
m_eventcb = std::shared_ptr<EventCB>(new EventCB);
m_conf->set("event_cb", m_eventcb.get(), errstr);
m_conf->set("dr_cb", m_deliverycb.get(), errstr);
m_producer = std::shared_ptr<RdKafka::Producer>(RdKafka::Producer::create(m_conf.get(), errstr));
if (m_producer == nullptr)
{
m_run = false;
return m_run;
}
return m_run;
初始化后,就报错了。 你的微信是多少,或者QQ,方便加一下吗
m_conf 指针,无可用信息,未为librdkafak.dll加载任何符号。 VS2017 + windows +c++ +librdkafka2.1.1
代码有内存有异常,在librdkafka2.1.1,windows c++ 环境下。 linux下正常