Comments (6)
Hi,
I had to do the same using the diff patch:
diff --git a/rdkafka.h b/rdkafka.h
index 15e7abd..327fa71 100644
--- a/rdkafka.h
+++ b/rdkafka.h
@@ -477,7 +477,7 @@ rd_kafka_message_errstr (const rd_kafka_message_t *rkmessage) {
return NULL;
if (rkmessage->payload)
- return rkmessage->payload;
+ return (const char *) rkmessage->payload;
return rd_kafka_err2str(rkmessage->err);
}
Also (maybe a Cygwin issue), I had to modify the Makefiles to discard the -Werror flag in order to compile:
diff --git a/examples/Makefile b/examples/Makefile
index 4f96afa..a142ec9 100644
--- a/examples/Makefile
+++ b/examples/Makefile
@@ -1,7 +1,7 @@
EXAMPLES ?= rdkafka_example rdkafka_performance
CC ?= cc
CXX ?= g++
-CFLAGS += -g -Wall -Werror -Wfloat-equal -Wpointer-arith -O2 -I../
+CFLAGS += -g -Wall -Wfloat-equal -Wpointer-arith -O2 -I../
CXXFLAGS += $(CFLAGS)
LDFLAGS += ../librdkafka.a
LDFLAGS += -lpthread -lz
diff --git a/Makefile b/Makefile
index 8fce227..dd06293 100644
--- a/Makefile
+++ b/Makefile
@@ -13,7 +13,7 @@ HDRS= rdkafka.h
OBJS= $(SRCS:.c=.o)
DEPS= ${OBJS:%.o=%.d}
-CFLAGS+=-O2 -Wall -Werror -Wfloat-equal -Wpointer-arith -fPIC -I.
+CFLAGS+=-O2 -Wall -Wfloat-equal -Wpointer-arith -fPIC -I.
CFLAGS+=-g
# Clang warnings to ignore
You may ask why Cygwin? Well, limitations of developer workstation on a restricted environment, not intended for the final deployment.
from librdkafka.
Thank you both for reporting this.
from librdkafka.
I think you might also want to do extern "C" around rdkafka.h. This way users who include it don't have to do it themselves when doing the include?
from librdkafka.
I will release a proper C++ interface end of january.
from librdkafka.
Looking forward to it. Will that be in partnership with https://github.com/adobe-research/libkafka or in competition? (I actually started using libkafka in the beginning and switched to librdkafka based on its better handling of my requirements)
from librdkafka.
This will be a proper C++ interface on top of the librdkafka's C interface.
from librdkafka.
Related Issues (20)
- Crash (null-pointer access) in rd_kafka_metadata_cache_entry_by_id_cmp() during rd_avl_insert() HOT 1
- GitHub repo disappeared HOT 10
- ThreadSanitizer: lock-order-inversion (potential deadlock)
- cooperative-sticky `performReassignments` can get stuck in an infinite loop HOT 10
- Looking to make librdkafka.a and librdkafka++.a in RHEL 7.4 HOT 1
- OpenSSL 3.0.8 in latest Nuget release HOT 5
- Consumer segfaults if broker doesn't support OffsetFetch
- Increased number of `rd_kafka_cgrp_terminated` with 2.5.0 and shutdown stability degradation HOT 4
- Unable to build without SSL since #4721 HOT 3
- Not switching to a leader without leader epochs while doing a cluster roll to upgrade the cluster HOT 1
- Issue whie getting librdkafka from Nuget.org via V3 API HOT 1
- Build Failure: unknown type name 'rd_kafka_broker_t' in rdkafka_op.h HOT 2
- Fail to recover a partition which was temporarily delegated to the internal broker HOT 1
- ThreadSanitizer: data race + hang in rd_kafka_destroy (or rd_kafka_destroy_flags) HOT 1
- How to create a librdkafka.so file?
- Incorrect version of zlib packaged with windows version
- X
- can not be used when making a shared object; recompile with -fPIC
- When I was to send the message to kafka's service, the message content was lost when I have found it by kafkatool
- compile issue with "Use STATIC_LIB_libzstd=/path/to/libzstd.a "
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from librdkafka.