ANNOUNCEMENT: Live Wireshark University & Allegro Packets online APAC Wireshark Training Session
July 17th, 2024 | 10:00am-11:55am SGT (UTC+8) | Online

Wireshark-dev: Re: [Wireshark-dev] libwireshark.lib is missing some proto_registrar_* methods

From: Andreas <AndreasSander1@xxxxxxx>
Date: Fri, 11 Feb 2011 06:42:02 +0100
Am 11.02.2011 00:06, schrieb Guy Harris:
> They weren't omitted on purpose.  They were probably omitted because
> they were added by a UN*X user; by default, UN*X dynamic shared
> libraries export every non-static symbol, unlike Windows DLLs.

I think this is a strong argument to move away from the export definition in DEF file to a decoration in the header file. With the prefix like i.e. WIRESHARK_API(1) you can decorate any function that is intended to be public available. The WIRESHARK_API will be #defined as declspec(__dllexport) or declspec(__dllimport) depending on the environment. Wile building any libWireshark module it's export, it's import when compiling a DLL using libWireshark.

(1) Any other prefix is acceptible.

--
Andy