cppkafka: `undefined reference to *` error on building consumer example
Hi,
First I installed librdkafka using instruction successfully. After that I installed cppkafka using document instruction, in addition command sudo make install at the end. So now both librdkafka and cppkafka are in directories /usr/local/lib and /usr/local/include. Trying to build consumer example code, the IDE(both Clion and Eclipse) resolved including libraries and show hints in using methods, but in building I faced error undefined reference to methods and classes. I check directory /usr/local/include and it only contains the .h files!
Did I do any steps wrong?
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Comments: 17 (7 by maintainers)
i have the same problem. i install rdkafka and cppkafka, then i write
main.cppi write the
CMakeLists.txtas follows:but when i compile and run the
main.cppit shows:what did i miss? gcc 5.4 ubuntu 16.04