"Guy Harris" <guy@xxxxxxxxxxxx> said:
> At one point, you'd proposed a scheme in which the main program could
> export symbols to plugins using the standard scheme for exporting
> symbols from DLLs.
>
> Have you ever gotten that to work? If so, perhaps we should just do
> that, and get rid of the whole plugin API transfer vector entirely.
I haven't given up on this. An idea just occured to me. We could
do:
#ifdef BUILDING_PLUGINS
#define extern __declspec(dllimport)
#else
#define extern __declspec(dllexport)
#endif
But then we need to ensure 'extern' isn't messing up foreign
headers like <gtk.h>. So all our headers must come after
<gtk.h> etc. And all C-files must include their corresponding
H-file with the __declspec. And prototypes of publics in
C-files are out of the question (at least those functions/variables
the plugins needs).
A tethereal.def file is probably not needed. With "gcc-shared .."
everything gets exported. We'd need to make an import lib for
both tethereal and ethereal (others using the plugins?)
I don't know Ethereal too well to say if this is a viable sollution.
But the plugin/X* scheme is such a terrible hack. I'll try this with
MingW first, then MSVC.
--gv