Wireshark-dev: [Wireshark-dev] Problem building new style plugin
From: Paul Offord <Paul.Offord@xxxxxxxxxxxx>
Date: Tue, 6 Feb 2018 00:12:19 +0000

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:

 

#ifndef VERSION

#define VERSION "0.0.0"

#endif

 

#define DLL_PUBLIC __attribute__((__visibility__("default")))

 

DLL_PUBLIC const gchar plugin_version[] = VERSION;

DLL_PUBLIC const gchar plugin_release[] = VERSION_RELEASE;

 

DLL_PUBLIC void plugin_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
______________________________________________________________________