Re: building a library using gtk+



John Cupitt wrote:
On 5/17/06, Rick Jones <rick jones2 hp com> wrote:

> I handle this by making my own .pc file for my library. It's fairly
> easy to get your configure script to generate one and install it
> correctly, but I could post an example if you like.
>
> One you have a mylibrary.pc installed, your users can compile and link
> with:
>
>  g++ main.cpp `pkg-config mylibrary --cflags --libs`
>
> and they should never need to see any gtk/glib/whatever nonsense.

No, but if they for whatever reason happen to be using a different
compiler than the one used to produce mylibrary, the pkg-config command
could give them options specific to a compiler they aren't using.


I hadn't thought if that :-( I imagine it's relatively uncommon (none
of the pkg-config output for gtk looks compiler-specific on OS X or
Breezy), but you're right, it could be a problem.

-pthread is one I come across often enough. sometimes even when GCC is the only compiler involved - something about revisions I suspect.

rick jones



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