Well, this depends on the compiled library.
It'll only work if the library supports C linkage conventions.
If this is not the case (probably), you have to write your own wrapper, in
C++, which exports 'extern "C"' functions to be called from within your C
dissector.
 
See also:
http://www.parashift.com/c++-faq-lite/mixing-c-and-cpp.html
http://www.objectvalue.com/articles/LinkingCtoCplusplusV02.html

regards,
Lars


  _____  

From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Chirag Lathia
Sent: vendredi 15 août 2008 20:12
To: Developer support list for Wireshark
Subject: [Wireshark-dev] Using C++ Library in Wireshark


Hi list,

I have written a dissector plugin for a protocol that is working well. Now,
I wish to extend this dissector, and for that I will need to use an already
compiled C++ Library. I do not have much experience with C++, so any help
would be appreciated.

My dissector is in C, and if I can call the methods in the C++ library, that
would be great. Any ideas on how I can accomplish this. I am compiling it on
win32 using nmake (compiler: cl).

Thanks,
Chirag Lathia.


_______________________________________________
Wireshark-dev mailing list
Wireshark-dev@wireshark.org
https://wireshark.org/mailman/listinfo/wireshark-dev

Reply via email to