I'm trying to add pcap functions into my C++ project in Clion on linux.
My h file contains:
#include <pcap/pcap.h>
And the CMAKE file was updated as well.
Instead of using the next command:
if (NOT MSVC)
target_link_libraries(${TARGET} pthread)
endif()
it is now:
if (NOT MSVC)
target_link_libraries(${TARGET} pthread pcap)
endif()
still getting the next errors:
undefined reference to "pcap_open_dead"
undefined reference to "pcap_dump_open"
undefined reference to "pcap_dump_close"
undefined reference to "pcap_close"
Anyone knows how to solve it?
Thanks