<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=ks_c_5601-1987">
<META content="MSHTML 6.00.2900.3199" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>I compiled the minimal cairo program on the cairo
web.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>There're UNDEFINED REFERENCE errors, thogh I could
find those names from libcairo.a</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Any ideas ?</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Thank you, guys !!!</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Woenkee.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>hrere is the command line I typed
---------------------------------------------------------------------------------------------------</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV>cc -o hello `pkg-config --cflags --libs cairo` hello.c<BR></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>here is the error message
-------------------------------------------------------------------------------------------------------------</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial
size=2>/cygdrive/c/DOCUME~1/wksohn/LOCALS~1/Temp/ccGmDUgm.o:hello.c:(.text+0x42):
undefined reference to
`_cairo_image_surface_c<BR>reate'<BR>/cygdrive/c/DOCUME~1/wksohn/LOCALS~1/Temp/ccGmDUgm.o:hello.c:(.text+0x50):
undefined reference to
`_cairo_create'<BR>/cygdrive/c/DOCUME~1/wksohn/LOCALS~1/Temp/ccGmDUgm.o:hello.c:(.text+0x76):
undefined reference to
`_cairo_select_font_fac<BR>e'<BR>/cygdrive/c/DOCUME~1/wksohn/LOCALS~1/Temp/ccGmDUgm.o:hello.c:(.text+0x8b):
undefined reference to
`_cairo_set_font_size'<BR>/cygdrive/c/DOCUME~1/wksohn/LOCALS~1/Temp/ccGmDUgm.o:hello.c:(.text+0xa8):
undefined reference to `_cairo_set_source_rgb'</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial
size=2>/cygdrive/c/DOCUME~1/wksohn/LOCALS~1/Temp/ccGmDUgm.o:hello.c:(.text+0xc7):
undefined reference to
`_cairo_move_to'<BR>/cygdrive/c/DOCUME~1/wksohn/LOCALS~1/Temp/ccGmDUgm.o:hello.c:(.text+0xda):
undefined reference to
`_cairo_show_text'<BR>/cygdrive/c/DOCUME~1/wksohn/LOCALS~1/Temp/ccGmDUgm.o:hello.c:(.text+0xe5):
undefined reference to
`_cairo_destroy'<BR>/cygdrive/c/DOCUME~1/wksohn/LOCALS~1/Temp/ccGmDUgm.o:hello.c:(.text+0xf8):
undefined reference to
`_cairo_surface_write_t<BR>o_png'<BR>/cygdrive/c/DOCUME~1/wksohn/LOCALS~1/Temp/ccGmDUgm.o:hello.c:(.text+0x103):
undefined reference to `_cairo_surface_destro<BR>y'<BR>collect2: ld returned 1
exit status<BR>[wksohn@ANDYIBM1 ~/oceanside]$
./compile<BR>/cygdrive/c/DOCUME~1/wksohn/LOCALS~1/Temp/cc2Njy4T.o:hello.c:(.text+0x42):
undefined reference to
`_cairo_image_surface_c<BR>reate'<BR>/cygdrive/c/DOCUME~1/wksohn/LOCALS~1/Temp/cc2Njy4T.o:hello.c:(.text+0x50):
undefined reference to
`_cairo_create'<BR>/cygdrive/c/DOCUME~1/wksohn/LOCALS~1/Temp/cc2Njy4T.o:hello.c:(.text+0x76):
undefined reference to
`_cairo_select_font_fac<BR>e'<BR>/cygdrive/c/DOCUME~1/wksohn/LOCALS~1/Temp/cc2Njy4T.o:hello.c:(.text+0x8b):
undefined reference to
`_cairo_set_font_size'<BR>/cygdrive/c/DOCUME~1/wksohn/LOCALS~1/Temp/cc2Njy4T.o:hello.c:(.text+0xa8):
undefined reference to `_cairo_set_source_rgb'</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial
size=2>/cygdrive/c/DOCUME~1/wksohn/LOCALS~1/Temp/cc2Njy4T.o:hello.c:(.text+0xc7):
undefined reference to
`_cairo_move_to'<BR>/cygdrive/c/DOCUME~1/wksohn/LOCALS~1/Temp/cc2Njy4T.o:hello.c:(.text+0xda):
undefined reference to
`_cairo_show_text'<BR>/cygdrive/c/DOCUME~1/wksohn/LOCALS~1/Temp/cc2Njy4T.o:hello.c:(.text+0xe5):
undefined reference to
`_cairo_destroy'<BR>/cygdrive/c/DOCUME~1/wksohn/LOCALS~1/Temp/cc2Njy4T.o:hello.c:(.text+0xf8):
undefined reference to
`_cairo_surface_write_t<BR>o_png'<BR>/cygdrive/c/DOCUME~1/wksohn/LOCALS~1/Temp/cc2Njy4T.o:hello.c:(.text+0x103):
undefined reference to `_cairo_surface_destro<BR>y'<BR>collect2: ld returned 1
exit status</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>here is the source code from <A
href="http://cairographics.org/FAQ/#minimal_C_program">http://cairographics.org/FAQ/#minimal_C_program</A>
----------------------------------------</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV>#include <cairo.h><BR><BR>int<BR>main (int argc, char
*argv[])<BR>{<BR> cairo_surface_t
*surface;<BR> cairo_t
*cr;<BR><BR> surface =
cairo_image_surface_create (CAIRO_FORMAT_ARGB32, 240,
80);<BR> cr = cairo_create
(surface);<BR><BR>
cairo_select_font_face (cr, "serif", CAIRO_FONT_SLANT_NORMAL,
CAIRO_FONT_WEIGHT_BOLD);<BR>
cairo_set_font_size (cr, 32.0);<BR>
cairo_set_source_rgb (cr, 0.0, 0.0,
1.0);<BR> cairo_move_to (cr, 10.0,
50.0);<BR> cairo_show_text (cr,
"Hello, world");<BR> cairo_destroy
(cr);<BR> cairo_surface_write_to_png
(surface, "hello.png");<BR>
cairo_surface_destroy
(surface);<BR><BR> return
0;<BR>}<BR></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>
<DIV><FONT face=Arial size=2>here is the library search result using nm
command
-----------------------------------------------------------------------</FONT></DIV>
<DIV> </DIV>
<DIV> </DIV></FONT></DIV>
<DIV><FONT face=Arial size=2>[wksohn@ANDYIBM1 /usr/local/lib]$ nm libcairo.a |
grep cairo_image_surface_create<BR>000006b0 T
__cairo_image_surface_create_for_data_with_content<BR>00000060 T
__cairo_image_surface_create_for_pixman_image<BR>00000890 t
__cairo_image_surface_create_similar<BR>00000580 T
__cairo_image_surface_create_with_content<BR>00000140 T
__cairo_image_surface_create_with_masks<BR>00000480 T
_cairo_image_surface_create<BR>000005c0 T
_cairo_image_surface_create_for_data<BR>
U
_cairo_image_surface_create<BR>
U
_cairo_image_surface_create<BR>
U
_cairo_image_surface_create<BR>
U
__cairo_image_surface_create_for_pixman_image<BR>
U
_cairo_image_surface_create<BR>
U
_cairo_image_surface_create<BR>
U
__cairo_image_surface_create_with_content<BR>
U
_cairo_image_surface_create<BR>
U _cairo_image_surface_create_for_data<BR>00000a90 T
_cairo_image_surface_create_from_png<BR>00000b90 T
_cairo_image_surface_create_from_png_stream<BR>
U
_cairo_image_surface_create_for_data<BR>
U _cairo_image_surface_create<BR>[wksohn@ANDYIBM1 /usr/local/lib]$</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV></BODY></HTML>