Ethereal-dev: Re: [Ethereal-dev] Re: tethereal and ethereal

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

From: Guy Harris <gharris@xxxxxxxxx>
Date: Tue, 17 Sep 2002 13:30:03 -0700
On Tue, Sep 17, 2002 at 10:22:41PM +0200, Joerg Mayer wrote:
> I don't think you are correct here: I've worked (well, acutally not :-)
> with versions of emacs that run with or without X. What I *think*
> they do is they load the required libx11 manually in case it is needed.

Yes, you could use "dlopen()" or its equivalent on the OS on which
you're running to load all the libraries needed to use GTK+.  Hopefully,
if you use that to load libgtk the run-time linker will automatically
load all the shared libraries libgtk needs; if not, you may have a
problem, as the set of shared libraries it needs is platform-dependent.

Then again, so is the mechanism used to load stuff at run time; Ethereal
would have to use the GTK+ module loading code to load the libraries, to
hide that platform dependency at a lower level, but that code currently
knows nothing about the MacOS X dynamic loading mechanism, so there'd be
a problem on MacOS X - you'd have to statically link with all those
libraries, assuming XDarwin *has* static libraries for them.

That sounds, at best, like a really messy way of solving the problem; I
prefer...

> On the original post: There are two ways to achieve better modularity:
> A generic application that loads the appropriate front end on demand or
> the other way round: Many specific front ends that load a set of common
> libraries.

...the latter of those two mechanisms (separate binaries for Tethereal
and for Ethereal with various user interfaces, and possibly for other
applications built atop the common libraries, rather than One Big
Application That Does It All).