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: [email protected] >> [mailto:[email protected]] 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 Link >> >>> Protocol) 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 or >>> >> even compile >> >>> some existing C++ code into my dissector it would make my >>> >> life a lot >> >>> easier. >>> >>> 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 the >>> >> particular real >> >>> time linux I am using. >>> >>> Regards, >>> >>> Eric Lidwa >>> >>> NASA,GSFC Greenbelt, MD >>> >>> >>> >> ---------------------------------------------------------------------- >> >>> -- >>> >>> >>> >> ______________________________________________________________ >> _____________ >> >>> Sent via: Wireshark-dev mailing list >>> >> <[email protected]> >> >>> Archives: http://www.wireshark.org/lists/wireshark-dev >>> Unsubscribe: https://wireshark.org/mailman/options/wireshark-dev >>> >>> mailto:[email protected]?subject=unsubscribe >>> >> > ___________________________________________________________________________ > Sent via: Wireshark-dev mailing list <[email protected]> > Archives: http://www.wireshark.org/lists/wireshark-dev > Unsubscribe: https://wireshark.org/mailman/options/wireshark-dev > mailto:[email protected]?subject=unsubscribe > > > ___________________________________________________________________________ Sent via: Wireshark-dev mailing list <[email protected]> Archives: http://www.wireshark.org/lists/wireshark-dev Unsubscribe: https://wireshark.org/mailman/options/wireshark-dev mailto:[email protected]?subject=unsubscribe
