Wireshark-dev: Re: [Wireshark-dev] Simpifying exporting DLL symbols
From: Gisle Vanem <[email protected]>
Date: Wed, 27 Feb 2013 10:48:19 +0100
"Bálint Réczey" <[email protected]> wrote:

I have created the attached patch to control symbol visibility using
C defines instead of .def and .sym files. It is expected to work on every
platform and every build system we support, but I did not want to
commit it without discussing the direction.
Nice, but why not use nicer indenting to make it more readable?

And what about foreign programs that would like to use e.g. libwireshark
code as a static lib? ws_symbol_export.h should IMHO account for this.
Something like:

#if (defined (_WIN32) || defined (__CYGWIN__)) & !defined(WS_STATIC_LIB)
 #ifdef WS_BUILD_DLL
   #ifdef __GNUC__
     #define WS_DLL_PUBLIC __attribute__ ((dllexport))
     #define WS_DLL_PUBLIC __declspec(dllexport) // Note: actually gcc seems to also support this syntax.

There is some interest out there to use libwireshark outside *shark programs:

The old Packetyzer 5.0 also uses ethereal libs. See: