Re: Statically linking Gtkmm

On Wed, 2006-07-12 at 22:09 -0700, Joe Van Dyk wrote:
> On 7/12/06, Paul Davis <paul linuxaudiosystems com> wrote:
> > On Wed, 2006-07-12 at 19:32 -0700, Joe Van Dyk wrote:
> > > Hi,
> > >
> > > I'm trying to statically link the radar example.  Any chance someone
> > > could provide me with the appropriate g++ line?
> > >
> > > Here's a quick sample of my problem.  Did I miss a library or get
> > > something out of order?
> >
> > give up on statically linking against GTK. its very very hard to make it
> > work. gtkmm is OK, as long as you opted to build the static library at
> > the outset.
> In my case, Redhat Enterprise 3 (and CentOS 3) come with Gtk 2.2.  I
> need to use Gtk 2.4.  The less I have to install on the machines that
> run the program, the better.  Do I need to install the shared Gtk 2.4
> libraries?

we encounter similar issues with ardour, and many other large apps have
the same issues too. the generally adopted solution is to make your
executable be a shell-script that sets LD_LIBRARY_PATH to point to a
private lib directory, and then exec's the real executable (which
typically lives inside that lib directory along with the other shared

in some cases, this is actually required. ardour used to do static
builds of all the 3rd party C++ libraries it uses, but then we ported to
x86_64 and ran into issues with combining static libraries and run-time
linking. we switched to 100% shared linkage with a private lib dir and
haven't looked back since.

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]