Ò׽ؽØÍ¼Èí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

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£º±íʾ±àÒëΪλÖöÀÁ¢µÄ´úÂ룬²»ÓôËÑ¡ÏîµÄ»°±àÒëºóµÄ´úÂëÊÇλÖÃÏà¹ØµÄËùÒÔ¶¯Ì¬ÔØÈëʱÊÇͨ¹ý´úÂ뿽±´µÄ·½Ê½


Ïà¹ØÎĵµ£º

ʵսLinux Bluetooth±à³Ì£¨ËÄ£© L2CAP²ã±à³Ì

£¨L2CAPЭÒé¼ò½é£¬L2CAPÔÚBlueZÖеÄʵÏÖÒÔ¼°L2CAP±à³Ì½Ó¿Ú£©
Ò»£ºL2CAPЭÒé¼ò½é£º
Logical Link Control and Adaptation Protocol(L2CAP)
Âß¼­Á¬½Ó¿ØÖƺÍÊÊÅäЭÒé (L2CAP) ΪÉϲãЭÒéÌá¹©ÃæÏòÁ¬½ÓºÍÎÞÁ¬½ÓµÄÊý¾Ý·þÎñ£¬²¢Ìṩ¶àЭÒ鹦ÄܺͷָîÖØ×é²Ù×÷¡£L2CAP ³äÐíÉϲãЭÒéºÍÓ¦ÓÃÈí¼þ´«ÊäºÍ½ÓÊÕ×î´ó³¤¶ÈΪ 64K µÄ L2CAP Ê ......

LinuxÉ豸ģÐÍÖ®input×ÓϵͳÏê½â

Ò»£ºÇ°ÑÔ
×î½üÔÚÑо¿androidµÄsensor driver£¬Ö÷ÒªÊÇE-compass£¬ÆäÖÐÓõ½ÁËLinux input×Óϵͳ.ÔÚÍøÉÏÒ²¿´Á˺ܶàÕâ·½ÃæµÄ×ÊÁÏ£¬¸Ð¾õ»¹ÊÇÕâÆª·ÖÎöµÄ±È½ÏϸÖÂ͸³¹£¬Òò´Ë×ªÔØÒ»ÏÂÒÔ±ã×Ô¼ºÑ§Ï°£¬Í¬Ê±ºÍ´ó¼Ò·ÖÏí£¡
£¨ÕâÆª²©¿ÍÖ÷ÒªÊÇÒÔ¼üÅÌÇý¶¯ÎªÀýµÄ£¬²»¹ý½²½âµÄÊÇLinux Input Subsystem£¬¿ÉÒÔ×ÐϸµÄÑо¿Ò»Ï£¡£©
¼üÅÌÇý¶¯½«¼ì ......

linux 2.6 ÄÚºËÄ£¿éµÄMakefile



 
Linux 2.6 ÏÂÄÚºËÄ£¿éµÄMakefile
ÊÕ²Ø



Linux 2.6 ÏÂÄÚºËÄ£¿éµÄMakefile
# Makefile 2.6
obj-m += hello.o
KDIR:=/lib/modules/$(shell uname -r)/build
# PWD=$(shell pwd)
all:
 &n ......

The Linux Printing HOWTO

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 ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ