Wireshark-dev: Re: [Wireshark-dev] Makefile for wireshark dissector

From: Ed Beroset <beroset@xxxxxxxxxxxxxx>
Date: Mon, 18 Jul 2011 09:36:25 -0400 (GMT-04:00)
sagar sg wrote:
>
>I am doing the same way, but i am getting lot of errors with wireshark
>libraries like
>
>/export/qdserver/wireshark/wireshark-1.4.7/epan/tfs.h:39: error: expected
>constructor, destructor, or type conversion before const
>
>u have any idea abt this type of error ? i am using g++ compiler and
>wireshark 1.4.7 libraries.

Well, the obvious answer is to use the gcc compiler instead of g++ and write in C instead of C++.  

If that won't work for you for some reason, you need to modify your C++ code.  The compiler message you've shown is complaining about a typedef'd struct declaration not being a proper C++ object.  That same complaint will be made about EVERY such struct in wireshark that your code uses, either directly or indirectly, unless you tell your code that your included files are C and not C++.  See http://www.parashift.com/c++-faq-lite/mixing-c-and-cpp.html for details about how to do this.

Ed



Ed