Wireshark-dev: Re: [Wireshark-dev] plugins and C++
From: wsgd <wsgd@xxxxxxx>
Date: Sat, 16 Jan 2010 12:09:53 +0100
Thanks for the info. The solution was very simple : link with g++ (instead of gcc). Olivier RUOFF LARS a �crit :
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@xxxxxxxxxxxxx [mailto:wireshark-dev-bounces@xxxxxxxxxxxxx] On Behalf Of wsgdSent: 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.even compileI am now implementing dissectors for the payload part of one of the protocols. Without going into details, if I could call orsome existing C++ code into my dissector it would make mylife a lotparticular realeasier.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 thetime linux I am using. Regards, Eric Lidwa NASA,GSFC Greenbelt, MD------------------------------------------------------------------------______________________________________________________________ _____________Sent via: Wireshark-dev mailing list<wireshark-dev@xxxxxxxxxxxxx>Archives: http://www.wireshark.org/lists/wireshark-dev Unsubscribe: https://wireshark.org/mailman/options/wireshark-devmailto:wireshark-dev-request@xxxxxxxxxxxxx?subject=unsubscribe___________________________________________________________________________ Sent via: Wireshark-dev mailing list <wireshark-dev@xxxxxxxxxxxxx> Archives: http://www.wireshark.org/lists/wireshark-dev Unsubscribe: https://wireshark.org/mailman/options/wireshark-dev mailto:wireshark-dev-request@xxxxxxxxxxxxx?subject=unsubscribe
- References:
- [Wireshark-dev] plugins and C++
- From: Lidwa, Eric (GSFC-582.0)[SGT INC]
- Re: [Wireshark-dev] plugins and C++
- From: wsgd
- Re: [Wireshark-dev] plugins and C++
- From: RUOFF LARS
- [Wireshark-dev] plugins and C++
- Prev by Date: Re: [Wireshark-dev] Failing to get my tree to show
- Next by Date: Re: [Wireshark-dev] Failing to get my tree to show
- Previous by thread: Re: [Wireshark-dev] plugins and C++
- Next by thread: [Wireshark-dev] submitting code to wireshark to be part of distribution
- Index(es):
- Get Wireshark
- Download
- Code of Conduct