Wireshark mailing list archives
Problems building easy_codec.dll
From: Gisle Vanem <gvanem () broadpark no>
Date: Fri, 15 Mar 2013 12:35:35 +0100
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 () wireshark org> Archives: http://www.wireshark.org/lists/wireshark-dev Unsubscribe: https://wireshark.org/mailman/options/wireshark-dev mailto:wireshark-dev-request () wireshark org?subject=unsubscribe
Current thread:
- Problems building easy_codec.dll Gisle Vanem (Mar 15)
- Re: Problems building easy_codec.dll Bálint Réczey (Mar 15)