-
Notifications
You must be signed in to change notification settings - Fork 3.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error when compiling against librdkafka with g++ (as opposed to gcc), even with extern "C" #36
Comments
Hi, I had to do the same using the diff patch:
Also (maybe a Cygwin issue), I had to modify the Makefiles to discard the -Werror flag in order to compile:
You may ask why Cygwin? Well, limitations of developer workstation on a restricted environment, not intended for the final deployment. |
Thank you both for reporting this. |
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? |
I will release a proper C++ interface end of january. |
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) |
This will be a proper C++ interface on top of the librdkafka's C interface. |
Hi,
I had to make a change to get a C++ program to compile against librdkafka even with extern "C" of the header file. I think the error is less about C vs. C++ though but perhaps related to more strict error checking.
rd_kafka_message_errstr returns a const char *, however, it is returning the rkmessage->payload, which is a void *. I had to add cast it to const char * in the return statement to get it to compile.
The text was updated successfully, but these errors were encountered: