Hi, I'm writing a dissector that I've put in the plugins directory. Some of the code being called by my dissector is C++ code. The C++ code has been compiled into a library. Currently, I am calling "make" from my wireshark installation directory, which compiles foo.o with gcc and then attempts to link foo.o with my C++ library with gcc as well (to form foo.so). However, I believe I want to use g++ to link, right? Right now after I call "make", I am separately issuing a g++ link command. Is there any clever way to integrate the g++ link command into the "make" so that I don't have to link with a separate call? Also, I'm not too familiar with shared objects. It looks like any library I link in has to be compiled with the -fPIC flag - is that right? asked 17 Oct '11, 16:49 JVo |
I really dont know the answer but can share some knowledge...
ifdef __cplusplus
extern "C" {
endif / __cplusplus /
This code is present in some of the header files which will allow the cplusplus code to sync up with the C.
Thanks. Yes, I am using the ifdef _cplusplus extern "C" code. But if anybody can help answer either of the other questions, that would be great.