This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Calling shared libs from static libs


Hi,
When i link to non-shared libraries such as libpangoxft-1.0.a, i get lots of
"undefined reference" errors to things that are defined in the X libs.

Is it possible to link to a non-shared library, that in turn calls shared
libraries?

I want to get "shapegen" to link with eg, libpangoxft-1.0.a, so that at
run-time, libpangoxft-1.0.a will call the shared X libs.

I've tried:

ld  -o shapegen -static /usr/lib/gcrt1.o main.o gui.o xmalloc.o object.o menu.o dialog.o
    -L /usr/X11R6/lib
    -lgtk-x11-2.0 -lgdk-x11-2.0 -latk-1.0 -lgdk_pixbuf-2.0 -lm -lpangoxft-1.0
    -lpangox-1.0 -lpango-1.0 -lgobject-2.0 -lgmodule-2.0 -ldl -lglib-2.0
    -lc /usr/lib/gcc-lib/i386-linux/3.3.1/libgcc.a

but it gives lots of errors like:

/usr/bin/../lib/libpangox-1.0.a(pangox-fontmap.o)(.text+0xceb): In function `pango_x_store_cached_coverage':
: undefined reference to `XSetErrorHandler'
/usr/bin/../lib/libpangox-1.0.a(pangox-fontmap.o)(.text+0x1db8): In function `pango_x_fontmap_atom_from_name':
: undefined reference to `XInternAtom'
/usr/bin/../lib/libpangox-1.0.a(pangox-fontmap.o)(.text+0x1e20): In function `pango_x_fontmap_name_from_atom':
: undefined reference to `XGetAtomName'
/usr/bin/../lib/libpangox-1.0.a(pangox-fontmap.o)(.text+0x1e35): In function `pango_x_fontmap_name_from_atom':
: undefined reference to `XFree'

I'm using debian 2.4.20, ld 2.14.90.0.4.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]