????1??/usr/lib/gcc/i686-linux-gnu/4.6/../../../i386-linux-gnu/crt1.o: In function `_start':

????(.text+0x18):undefined reference to `main'

????collect2: ld ???? 1

????Reason: no main function in source file

????2??to get compile options -I and -l

????pkg-config lib

????e.g: pkg-config --cflags --libs dbus-1 glib-2.0 dbus-glib-1

????gcc -o send-sms send-sms.c `pkg-config --cflags --libs dbus-1 glib-2.0 dbus-glib-1`

????3???????pkg-config??????д???

?????????????????libxxx.pc.in?????л?????????????????????????Щ?????????????????????????????????????????????????????仰?????????????????????????

prefix=@PREFIX@
exec_prefix=${prefix}
libdir=${exec_prefix}/lib
includedir=${prefix}/include

Name: library name
Description: description goes here
Requires: glib-2.0 gobject-2.0
Version: 0.1
Libs: -L${libdir} -llibrary_name
Cflags: -I${includedir}/some_sub_dir

??????????????????????????????????pkg-config???????????

????4??forward declaration and incomplete type

??????????????????????????????????????????????????????????????????????????δ?ж??塣??????????????????????????

#ifndef __POINT_H

#define__POINT_H

typedef struct _Point Point;

#endif

????????????????????????????????Point?????:

????1????????????????????????void print_point(Point p)??????????????????????????庯??

????2?????????Point *p;

??????????????Point??????????

????1???綨???????Point p;

????2?????庯??????βΣ?void print_point(Point p) { ... }

????3?????????????????????????Point *point = (Point *) calloc(1?? sizeof(Point));

????????incomplete type????????????????????Notification?????????С???????????????????????в???и??????????壬?????????????????????????????棬????????????

????C++????????????Ч???Forward declaration????????????????????????????????????????????ж??????

class Point;
Point a;

???????Foward declaration????????????????????????????????????