[Cairo] Link Problems

Brian Victor bhv1 at psu.edu
Fri Sep 12 14:44:56 PDT 2003


I was getting link errors with xsvg, and now I find them with the
cairo-demo programs as well.  I may be overlooking something stupid, in
which case I appreciate your patience in figuring this out.

A very short time ago I ran a cvs update on all the relevant libraries
(slim, pixregion, ic, cairo) and recompiled and installed them.
However, trying to make the demo fails thusly (abbreviated output):

cc -g -Wall -Wstrict-prototypes -Wmissing-prototypes
-Wmissing-declarations -Wredundant-decls `pkg-config --cflags cairo`
`pkg-config --libs cairo`  cairo-demo.c   -o cairo-demo

/tmp/ccDHKti1.o(.text+0x114): In function `triangle':
/home/bhv1/svgcode/cairo-demo/X11/cairo-demo.c:56: undefined reference
to `cairo_move_to'
/tmp/ccDHKti1.o(.text+0x134):/home/bhv1/svgcode/cairo-demo/X11/cairo-demo.c:57:
undefined reference to `cairo_rel_line_to'
/tmp/ccDHKti1.o(.text+0x154):/home/bhv1/svgcode/cairo-demo/X11/cairo-demo.c:58:
undefined reference to `cairo_rel_line_to'
/tmp/ccDHKti1.o(.text+0x15c):/home/bhv1/svgcode/cairo-demo/X11/cairo-demo.c:59:
undefined reference to `cairo_close_path'
...
/usr/local/lib/libcairo.so: undefined reference to `IcImageDestroy'
/usr/local/lib/libcairo.so: undefined reference to `IcFillRectangles'
/usr/local/lib/libcairo.so: undefined reference to `IcImageSetRepeat'
/usr/local/lib/libcairo.so: undefined reference to `IcComposite'


Environment information:
%nm /usr/local/lib/libcairo.a | grep cairo_move_to
000009dc T EXT_cairo_move_to
000009dc T INT_cairo_move_to

%nm /usr/local/lib/libic.a | grep IcImageDestroy
00000348 T EXT_IcImageDestroy
00000348 T INT_IcImageDestroy
000003a0 T IcImageDestroyClip
         U INT_IcImageDestroy
         U INT_IcImageDestroy
         U INT_IcImageDestroy

%pkg-config --cflags cairo
 -I/usr/include/freetype2 -I/usr/X11R6/include -I/usr/local/include

%pkg-config --libs cairo
 -L/usr/X11R6/lib -L/usr/local/lib -lXft -lfreetype -lz -lXrender -lXext
-lX11 -lfontconfig -lcairo -lm -lic -lpixregion  

%gcc -v
Reading specs from /usr/lib/gcc-lib/powerpc-linux/2.95.4/specs
gcc version 2.95.4 20011006 (Debian prerelease)

It's been a while since I've done pure C, and can't figure out where
those INT and EXT prefixes on the symbols are coming from.  I'd
appreciate any advice.

-- 
Brian




More information about the cairo mailing list