Wireshark mailing list archives
Re: plugins and C++
From: "RUOFF LARS" <Lars.Ruoff () alcatel-lucent com>
Date: Thu, 14 Jan 2010 09:51:44 +0100
Hi, Mixing C++ with C code is not that easy, unfortunately. (Especially in the sense you are interested in, that is include C++ in C code) Have a look here: http://www.parashift.com/c++-faq-lite/mixing-c-and-cpp.html Regards, Lars
-----Original Message----- From: wireshark-dev-bounces () wireshark org [mailto:wireshark-dev-bounces () wireshark org] On Behalf Of wsgd Sent: mercredi 13 janvier 2010 19:44 To: Developer support list for Wireshark Subject: Re: [Wireshark-dev] plugins and C++ Hello, I have a C++ dissector which works on Windows. I try to generate it on Ubuntu 9.10. For testing purpose on Ubuntu 9.10, I removed everything except intantiating a C++ object : ofstream ofs ("wireshark_generic_dissector_traces.txt"); The makefile I use is a copy/paste of another dissector (not a C++ dissector), with only 3 modifications : - change the source files ! - add .cpp into ".SUFFIXES: .c .cpp .lo .o .obj" - add .cpp rule ".cpp.lo: ..." which is copy/paste of ".c.lo:" The generation works, BUT ... When I launch wireshark, my dissector is NOT loaded with the following error : Couldn't load module /home/olivier/.wireshark/plugins/generic.so: /home/olivier/.wireshark/plugins/generic.so: undefined symbol: _ZTTSt14basic_ofstreamIcSt11char_traitsIcEE Even if I remove the C++ object (C++ include still here) : undefined symbol: _ZNSt8ios_base4InitD1Ev I do not know which options are necessary to fix the problem. Any idea welcome. Olivier Lidwa, Eric (GSFC-582.0)[SGT INC] a écrit :Good afternoon, I have written several dissectors so far, one for AOS(Space Data LinkProtocol) and two for different versions of DEM (Data Exchange Message). The dissectors were implemented as plugins. I am now implementing dissectors for the payload part of one of the protocols. Without going into details, if I could call oreven compilesome existing C++ code into my dissector it would make mylife a loteasier. So here is a question, has anybody been able to write a plugin dissector in C++? I thought I ask before diving into hacking the makefiles. One thing to mention is that I do not care for multi platform support as long as "my" Wireshark runs on theparticular realtime linux I am using. Regards, Eric Lidwa NASA,GSFC Greenbelt, MD------------------------------------------------------------------------______________________________________________________________ _____________Sent via: Wireshark-dev mailing list<wireshark-dev () wireshark org>Archives: http://www.wireshark.org/lists/wireshark-dev Unsubscribe: https://wireshark.org/mailman/options/wireshark-dev mailto:wireshark-dev-request () wireshark org?subject=unsubscribe
___________________________________________________________________________ Sent via: Wireshark-dev mailing list <wireshark-dev () wireshark org> Archives: http://www.wireshark.org/lists/wireshark-dev Unsubscribe: https://wireshark.org/mailman/options/wireshark-dev mailto:wireshark-dev-request () wireshark org?subject=unsubscribe
Current thread:
- plugins and C++ Lidwa, Eric (GSFC-582.0)[SGT INC] (Jan 12)
- Re: plugins and C++ wsgd (Jan 13)
- Re: plugins and C++ RUOFF LARS (Jan 14)
- Re: plugins and C++ wsgd (Jan 16)
- Re: plugins and C++ RUOFF LARS (Jan 14)
- Re: plugins and C++ wsgd (Jan 13)