Wireshark-dev: Re: [Wireshark-dev] WS_DLL_PUBLIC only works for files with registered protocols
From: Guy Harris <guy@xxxxxxxxxxxx>
Date: Fri, 3 May 2013 18:17:43 -0700
On May 3, 2013, at 1:14 AM, Neil Piercy <Neil.Piercy@xxxxxxxxxxxx> wrote:

> [NPP>] Yes - but even with that the symbols did not show in the DLL (but were global in the .lib).

Well, I tried adding WS_DLL_PUBLIC to the declaration of dissect_ndr_datablob() in epan/dissectors/packet-dcerpc-nt.h and building Wireshark; according to dumpbin/exports, dissect_ndr_datablob is exported from libwireshark.dll.  epan/dissectors/packet-dcerpc-nt.c is one of the files in epan/dissectors with no registered protocols.

You're putting WS_DLL_PUBLIC in front of the *declaration* of your functions in the *header files* that declare them, *not* in front of the *definitions* of your functions in the *source files* that contain the source code for them, right?

If not, do so.  That's how you're supposed to use WS_DLL_PUBLIC.