linux lib ¶¯Ì¬¿â
¶¯Ì¬¿â*.soÔÚlinuxÏÂÓÃcºÍc++±à³Ìʱ¾³£»áÅöµ½£¬×î½üÔÚÍøÕ¾ÕÒÁ˼¸ÆªÎÄÕ½éÉܶ¯Ì¬¿âµÄ±àÒëºÍÁ´½Ó£¬×ÜËã¸ã¶®ÁËÕâ¸ö֮ǰһֱ²»Ì«Á˽âµÃ¶«¶«£¬ÕâÀï×ö¸ö±Ê¼Ç£¬Ò²ÎªÆäËüÕýΪ¶¯Ì¬¿âÁ´½Ó¿â¶ø¿àÄÕµÄÐÖµÜÃÇÌṩһµã°ïÖú¡£
1¡¢¶¯Ì¬¿âµÄ±àÒë
ÏÂÃæÍ¨¹ýÒ»¸öÀý×ÓÀ´½éÉÜÈçºÎÉú³ÉÒ»¸ö¶¯Ì¬¿â¡£ÕâÀïÓÐÒ»¸öÍ·Îļþ£ºso_test.h£¬Èý¸ö.cÎļþ£ºtest_a.c¡¢test_b.c¡¢test_c.c£¬ÎÒÃǽ«Õ⼸¸öÎļþ±àÒë³ÉÒ»¸ö¶¯Ì¬¿â£ºlibtest.so¡£
so_test.h£º
#include <stdio.h>
#include <stdlib.h>
void test_a();
void test_b();
void test_c();
test_a.c£º
#include "so_test.h"
void test_a()
{
printf("this is in test_a...\n");
}
test_b.c£º
#include "so_test.h"
void test_b()
{
printf("this is in test_b...\n");
}
test_c.c£º
#include "so_test.h"
void test_c()
{
printf("this is in test_c...\n");
}
½«Õ⼸¸öÎļþ±àÒë³ÉÒ»¸ö¶¯Ì¬¿â£ºlibtest.so
$ gcc test_a.c test_b.c test_c.c -fPIC -shared -o libtest.so
2¡¢¶¯Ì¬¿âµÄÁ´½Ó
ÔÚ1¡¢ÖУ¬ÎÒÃÇÒѾ³É¹¦Éú³ÉÁËÒ»¸ö×Ô¼ºµÄ¶¯Ì¬Á´½Ó¿âlibtest.so£¬ÏÂÃæÎÒÃÇͨ¹ýÒ»¸ö³ÌÐòÀ´µ÷ÓÃÕâ¸ö¿âÀïµÄº¯Êý¡£³ÌÐòµÄÔ´ÎļþΪ£ºtest.c¡£
test.c£º
#include "so_test.h"
int main()
{
test_a();
test_b();
test_c();
return 0;
}
l ½«test.cÓ붯̬¿âlibtest.soÁ´½ÓÉú³ÉÖ´ÐÐÎļþtest£º
$ gcc test.c -L. -ltest -o test
l ²âÊÔÊÇ·ñ¶¯Ì¬Á¬½Ó£¬Èç¹ûÁгölibtest.so£¬ÄÇôӦ¸ÃÊÇÁ¬½ÓÕý³£ÁË
$ ldd test
l Ö´ÐÐtest£¬¿ÉÒÔ¿´µ½ËüÊÇÈçºÎµ÷Óö¯Ì¬¿âÖеĺ¯ÊýµÄ¡£
3¡¢±àÒë²ÎÊý½âÎö
×îÖ÷ÒªµÄÊÇGCCÃüÁîÐеÄÒ»¸öÑ¡Ïî:
-shared ¸ÃÑ¡ÏîÖ¸¶¨Éú³É¶¯Ì¬Á¬½Ó¿â£¨ÈÃÁ¬½ÓÆ÷Éú³ÉTÀàÐ͵ĵ¼³ö·ûºÅ±í£¬ÓÐʱºòÒ²Éú³ÉÈõÁ¬½ÓWÀàÐ͵ĵ¼³ö·ûºÅ£©£¬²»ÓøñêÖ¾Íⲿ³ÌÐòÎÞ·¨Á¬½Ó¡£Ï൱ÓÚÒ»¸ö¿ÉÖ´ÐÐÎļþ
l -fPIC£º±íʾ±àÒëΪλÖöÀÁ¢µÄ´úÂ룬²»ÓôËÑ¡ÏîµÄ»°±àÒëºóµÄ´úÂëÊÇλÖÃÏà¹ØµÄËùÒÔ¶¯Ì¬ÔØÈëʱÊÇͨ¹ý´úÂ뿽±´µÄ·½Ê½
Ïà¹ØÎĵµ£º
1. HCI²ãÐÒé¸ÅÊö£º
HCIÌṩһÌ×ͳһµÄ·½·¨À´·ÃÎÊBluetoothµ×²ã¡£ÈçͼËùʾ£º
´ÓͼÉÏ¿ÉÒÔ¿´³ö£¬Host Controller Interface(HCI) ¾ÍÊÇÓÃÀ´¹µÍ¨HostºÍModule¡£Hostͨ³£¾ÍÊÇPC£¬ ModuleÔòÊÇÒÔ¸÷ÖÖÎïÀíÁ¬½ÓÐÎʽ£¨USB,serial,pc-cardµÈ£©Á¬½Óµ½PCÉϵÄbluetooth Dongle¡£
ÔÚHostÕâÒ»¶Ë£ºapplication,SDP,L2capµÈÐÒé ......
£¨L2CAPÐÒé¼ò½é£¬L2CAPÔÚBlueZÖеÄʵÏÖÒÔ¼°L2CAP±à³Ì½Ó¿Ú£©
Ò»£ºL2CAPÐÒé¼ò½é£º
Logical Link Control and Adaptation Protocol(L2CAP)
Âß¼Á¬½Ó¿ØÖƺÍÊÊÅäÐÒé (L2CAP) ΪÉϲãÐÒéÌá¹©ÃæÏòÁ¬½ÓºÍÎÞÁ¬½ÓµÄÊý¾Ý·þÎñ£¬²¢Ìṩ¶àÐÒ鹦ÄܺͷָîÖØ×é²Ù×÷¡£L2CAP ³äÐíÉϲãÐÒéºÍÓ¦ÓÃÈí¼þ´«ÊäºÍ½ÓÊÕ×î´ó³¤¶ÈΪ 64K µÄ L2CAP Ê ......
The Linux Printing HOWTO http://www.resoo.org/docs/printing/printing-howto.txt
Grant Taylor <gtaylor+pht@picante.com>
v3.30, 19 November 1999
This is the Linux Printing HOWTO, a collection of information on how
to generate, preview, print and fax anything under Linux ......
Íü¼ÇÔÚÄÄÀï¿´µ½µÄÁË¡£¡£Ô×÷ÕßÇë¼ûÁÂ~~
Fedora Core 6
¶ÔÓÚ·þÎñ½ø³ÌµÄ±ä»¯
bluetooth
Ïà¹ØµÄ·þÎñÓÐ bluetooth,hcid,hidd,sdpd,dund,pand
capi
½öÕë¶ÔISDN
Óû§
mctrans SELINUX
±ØÐëµÄ·þÎñ¡£
mdmpd
¼àÊÓ¶à·É豸µÄ·þÎñ
pcscd
Ö§³ÖÖÇÄÜ¿¨µÄ·þÎñ£¬ÕâÊÇFC6
¼ÓÈëÖÇÄÜ¿¨Ö§³ÖµÄÌØÕ÷Ö®Ò»
²¹³ä¼¸¸öFedo ......