Ethereal-dev: Re: [Ethereal-dev] enabling libethereal.dll with MSVC (update)

Note: This archive is from the project's previous web site, ethereal.com. This list is no longer active.

From: Lars Roland <Lars.Roland@xxxxxxx>
Date: Mon, 03 May 2004 03:56:34 +0200
Guy Harris wrote:


gmodule.h in GLib has a G_MODULE_EXPORT #define that's either
"__declspec(dllexport)" or empty; you might want to take a similar
approach, and have some header file define ETH_VAR_IMPORT as
"__declspec(dllimport)" or empty, depending on whether _NEED_VAR_IMPORT_
and HAVE_LIBETHEREALDLL are defined, and put ETH_VAR_IMPORT in front of
declarations of variables imported from libethereal.

Good idea, much cleaner and less ifdef's . I decided to use config.h. I added appropriate code to config.h.win32 in main dir and in epan. But I don't know where to put it for non MSVC users. Probably somewhere in "configure.in".
For non MSVC users following line has to be in config.h and epan/config.h:

#define ETH_VAR_IMPORT export

Attached is a new complete set of patches and an updated def file for libethereal, so forget the patches I sent before.

The def file contains now also the functions from the current plugin api table. Thus "libethereal.lib" can be used to replace the plugin api table. As an example patches for the MGCP dissector and makefile are attached, too. There is now an option in its makefile.nmake which let you decide to use the plugin api table or libethereal.lib.

Later we might decide to get rid of the plugin api table, when the new approach can be considered to be stable.

Regards,

Lars



Attachment: diff.tar.gz
Description: GNU Zip compressed data