Wireshark mailing list archives

Re: Problem building new style plugin


From: Anders Broman <a.broman58 () gmail com>
Date: Tue, 6 Feb 2018 06:33:18 +0100

Hi,
Did you try to delete the build dir and start over with cmake/msbuild ?
Regards
Anders

Den 6 feb. 2018 2:17 fm skrev "João Valverde" <
joao.valverde () tecnico ulisboa pt>:

Hi Paul,

DLL_PUBLIC is not "new style" (it's just a macro definition), although the
inference is understandable.

The hello plugin example is specific to Linux and GCC, the idea being that
you can just apt install wireshark (or equivalent) and build only your
plugin against that.

As far as visibility goes you can just include ws_symbol_export.h and use
WS_DLL_PUBLIC as usual.

Hope that helps.

On 06-02-2018 00:12, Paul Offord wrote:

Sorry to bother you all with this but I can’t seem to figure this out.

I was running with a git master branch that I think was 2.5.  I had a
plugin that I could build and it worked OK.  At the weekend I did a git
pull for master and now I can’t get my plugin to build.  I reread the
plugin.README and dissector.README files and I think I’ve done everything
necessary to code the plugin in the new style.

I’ve tried copying some of the code from the hello.c example,
specifically I’ve added this to the top of my plugin:

#ifndefVERSION

#defineVERSION "0.0.0"

#endif

#defineDLL_PUBLIC__attribute__((__visibility__("default")))

DLL_PUBLICconstgchar plugin_version[] = VERSION;

DLL_PUBLICconstgchar plugin_release[] = VERSION_RELEASE;

DLL_PUBLICvoidplugin_register(void);

The VERSION line errors on:

  * DLL_PUBLIC – expected a type specifier
  * const – expected a ‘{‘

I’ve got more issues, but I suspect they relate to DLL linkage (lots of
_/imp/_XXXX link errors).

The DLL_PUBLIC error seems pretty fundamental.  What am I doing wrong?

I’m using VS2015 on Windows 10.

Thanks and regards…Paul


______________________________________________________________________

This message contains confidential information and is intended only for
the individual named. If you are not the named addressee you should not
disseminate, distribute or copy this e-mail. Please notify the sender
immediately by e-mail if you have received this e-mail by mistake and
delete this e-mail from your system.

Any views or opinions expressed are solely those of the author and do not
necessarily represent those of Advance Seven Ltd. E-mail transmission
cannot be guaranteed to be secure or error-free as information could be
intercepted, corrupted, lost, destroyed, arrive late or incomplete, or
contain viruses. The sender therefore does not accept liability for any
errors or omissions in the contents of this message, which arise as a
result of e-mail transmission.

Advance Seven Ltd. Registered in England & Wales numbered 2373877 at
Endeavour House, Coopers End Lane, Stansted, Essex CM24 1SJ

______________________________________________________________________
This email has been scanned by the Symantec Email Security.cloud service.
For more information please visit http://www.symanteccloud.com
______________________________________________________________________


____________________________________________________________
_______________
Sent via:    Wireshark-dev mailing list <wireshark-dev () wireshark org>
Archives:    https://www.wireshark.org/lists/wireshark-dev
Unsubscribe: https://www.wireshark.org/mailman/options/wireshark-dev
              mailto:wireshark-dev-request () wireshark org
?subject=unsubscribe

____________________________________________________________
_______________
Sent via:    Wireshark-dev mailing list <wireshark-dev () wireshark org>
Archives:    https://www.wireshark.org/lists/wireshark-dev
Unsubscribe: https://www.wireshark.org/mailman/options/wireshark-dev
            mailto:wireshark-dev-request () wireshark org?subject=unsubscribe
___________________________________________________________________________
Sent via:    Wireshark-dev mailing list <wireshark-dev () wireshark org>
Archives:    https://www.wireshark.org/lists/wireshark-dev
Unsubscribe: https://www.wireshark.org/mailman/options/wireshark-dev
             mailto:wireshark-dev-request () wireshark org?subject=unsubscribe

Current thread: