Wireshark-dev: Re: [Wireshark-dev] tshark linking in ui/libui.a with undefined symbols in 1.10.
From: Guy Harris <[email protected]>
Date: Wed, 12 Mar 2014 12:44:33 -0700
On Mar 11, 2014, at 1:36 PM, Albert Chin <[email protected]> wrote:

> tshark links without the GUI code but the non-GUI code is not fully
> self-contained. ui/libui.a is linked into tshark but it contains
> functions defined outside of the libraries linked into tshark. Some of
> these functions are defined in the GUI code, such as
> simple_message_box() defined in gtk/libgtkui.a. HP-UX, Linux, and
> Solaris don't have an issue with this but AIX won't link the resulting
> executable. We've worked around this by instruction the linker to
> ignore the errors by passing -berok. The real solution is not to have
> ui/libui.a make calls to a dependent library that an executable
> linking to it won't link to but I don't know how much work that would
> involve. Maybe a note about this is sufficient for now.

The problem is that:

	almost all of libui is routines for the Wireshark GUI that are toolkit-independent (and, in those cases, end up calling routines with a toolkit-independent API but toolkit-dependent implementations);

	most of the rest of libui is code for taps that are implemented in both TShark and Wireshark;

	one remaining routine in libui glues multiple arguments together in a string (used by some programs, including but not limited to TShark, to take a bunch of tokens from the command line and make them into a filter string, tcpdump-style).

Those should probably be split into at least two separate libraries, possibly more.