Wireshark-dev: Re: [Wireshark-dev] Problems building easy_codec.dll
From: Bálint Réczey <balint@xxxxxxxxxxxxxxx>
Date: Fri, 15 Mar 2013 13:35:24 +0100
Thanks Gisle,

I'll commit this soon.

Cheers,
Balint

2013/3/15 Gisle Vanem <gvanem@xxxxxxxxxxxx>:
> I'm having a problem compiling the *non* generated easy_codec_plugin.c. The
> message from MSVC is:
>  "error C2491: 'version' : definition of dllimport data not allowed"
> for the line:
>  WS_DLL_PUBLIC_NOEXTERN const gchar version[] = "0.0.1";
>
> The preprocessed output becomes:
>  __declspec(dllimport) const gchar version[] = "0.0.1";
>
> So no wonder MSVC is complaining. Looking at the various Makefile.common
> under plugins, I see only a:
>
>  NONGENERATED_C_FILES = \
>          easy_codec_plugin.c     \
>
> in plugins\easy_codec\Makefile.common. Has this fallen behind?
>
> Anyway, this patch fixes it for me:
>
> --- SVN-Latest\plugins\easy_codec\easy_codec_plugin.c   Mon Mar 04 17:52:26
> 2013
> +++ plugins\easy_codec\easy_codec_plugin.c      Fri Mar 15 11:35:08 2013
> @@ -25,6 +25,9 @@
>
> #ifndef ENABLE_STATIC
> #include "config.h"
> +
> +/* plugins are DLLs */
> +#define WS_BUILD_DLL
>
> #include <gmodule.h>
> #include <epan/codecs.h>
>
> --------
>
> The same 'WS_BUILD_DLL' is put in e.g. the *generated*
> plugins\wimaxasncp\wimaxasncp_plugin.c.
>
> --gv
>
>
>
>
> ___________________________________________________________________________
> Sent via:    Wireshark-dev mailing list <wireshark-dev@xxxxxxxxxxxxx>
> Archives:    http://www.wireshark.org/lists/wireshark-dev
> Unsubscribe: https://wireshark.org/mailman/options/wireshark-dev
>             mailto:wireshark-dev-request@xxxxxxxxxxxxx?subject=unsubscribe