Re: Static linking of libraries

Luca Padovani <[email protected]> Thu, 05 Feb 2004 18:52:50 +0100
Newsgroups gmane.comp.gnome.gdome
Message-ID <1076003570.937.22.camel@giraffe>
Hi,

On Thu, 2004-02-05 at 17:38, Sunil Kumar wrote:
> Hi,
> 
> I downloaded the source compiled and testing the
> samples. However I want to write my own program and
> link it statically to the library. 
> 
> Just statically linking to libgdome.a is giving
> copmpile errors e.g. - lots of undefined references
> like "xmlHashFree" etc.

you need to link libxml2 and glib as well, as they are used from inside
gdome2. Try

pkg-config gdome2 --libs

to get the list of libraries gdome2 depends on, and link them
(statically or dynamically) along with gdome2.

--Luca