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

linux ±à³ÌÖ®¿âµÄʹÓã¨Ñ§Ï°±Ê¼Ç£©

1.¿â¸ÅÊö
¿â¿ÉÒÔ·ÖΪ¾²Ì¬¿âºÍ¶¯Ì¬¿â£¬¾²Ì¬¿â±àÒëʱ±ØÐë´æÔÚ£¬³ÌÐòÔËÐÐʱ²»ÐèÒª¡£
¶¯Ì¬¿âÒ²³Æ¹²Ïí¿â£¬Æä´úÂë²»»áÁ´½Óµ½Ä¿±êÎļþÖ®ÖУ¬Ö»Ó屶¯Ì¬¿â¿É·ÃÎÊʱ£¬Ó¦ÓóÌÐò²ÅÄÜÕýÈ·µØÖ´Ðж¯Ì¬¿âº¯Êý¡£Ö´Ðж¯Ì¬¿âÓÐÁ½ÖÖ·½Ê½£ºÒþʽµ÷ÓúÍÏÔʾµ÷Óá£Òþʽµ÷ÓÃÒ²³Æ¹²Ïí¿âµÄ¾²Ì¬¼ÓÔØ£¬¶¯Ì¬¿âº¯ÊýÔÚÓ¦ÓóÌÐò¿ªÊ¼Ö´ÐÐʱ»á×Ô¶¯ÔØÈëÄڴ棬½ø³Ì½áÊøʱÓÖ×Ô¶¯Ð¶ÔØ¡£±àÒ뷽ʽÓ뾲̬¿âÒ»Ö¡£ÏÔʾµ÷ÓÃÒ²³Æ¹²Ïí¿âµÄ¶¯Ì¬¼ÓÔØ£¬µ÷ÓÃʱ±ØÐë×ñÊØdlopenµÈº¯ÊýµÄ¹æÔòʵÏÖµ÷Óá£
 
ÔÚUnixÖУ¬Ê¹ÓÃarÃüÁî¿ÉÒÔ´´½¨»ò²Ù×÷¾²Ì¬¿â£¬Æä¸ñʽΪ£º
ar [drqtpmx] [option] archivefile objfile ….
²ÎÊý
ÒâÒå
-r
½«objfileÎļþ²åÈ뾲̬¿âβ»òÌæ»»¾²Ì¬¿âÖÐͬÃûÎļþ
-x
´Ó¾²Ì¬¿âÎļþÖгéÈ¡Îļþobjfile
-t
´òÓ¡¾²Ì¬¿âµÄ³ÉÔ±ÎļþÁбí
-d
´Ó¾²Ì¬¿âÎļþÖÐɾ³ýÎļþobjfile
-s
ÖØÖþ²Ì¬¿âÎļþË÷Òý
-v
´´½¨ÎļþÈßÓàÐÅÏ¢
-c
´´½¨¾²Ì¬¿âÎļþ
 
Àý×Ó£º³éÈ¡¾²Ì¬¿â/usr/lib/lic.aÖеÄÎļþ
# ar –x /usr/lib/libc.a
Àý×Ó£º×éÖ¯Îļþxcvt.oºÍxstat.o´´½¨¾²Ì¬¿âlibccc.a¡£
# ar –r libccc.a xcvt.o xstat.o
 
2. ¾²Ì¬¿â±à³Ì
2.1 Éè¼Æ¿âÔ´Âë
/******pr1.c*****/
void pirnt1()
{
       printf(“this is the first lib src\n”);
}
/*******pr2.c***********/
void print2()
{
       printf(“this is the second lib src\n”);
}
 
2.2. ±àÒëÉú³É¿âÎļþ
gcc –O –c pr1.c pr2.c
·Ö±ð²úÉúpr1.o, pr2.oÎļþ
Á´½Ó¾²Ì¬¿â
ar –rsv libpr.a pr1.o pr2.o
2.3 ²âÊÔ³ÌÐòÔ´Âë
/********main.c************/
int main()
{
       print1();
       print2();
}
2.4 ±àÒëÔËÐÐ
gcc –O –o main main.c –L./ -lpr
 
3. ¶¯Ì¬¿â±à³Ì
3.1 ¿âÔ´Âë
/*******pr1.c********/
int p=2;
void print()
{
       printf(“This is the first dll src!\n”);
}
/*******pr2.c*********/
int p = 3;
void print()
{
       printf(“This is the second dll src!\n”);
}
 
3.2 ±àÒëÉú³É¶¯Ì¬¿â
gcc –O –fpic –shared &n


Ïà¹ØÎĵµ£º

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

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

[תÌû]LinuxÇý¶¯¿ª·¢Ñ§Ï°µÄһЩ±ØÒª²½Öè

 1. ѧ»áд¼òµ¥µÄmakefile
2. ±àһЩӦÓÃ
³ÌÐò
£¬¿ÉÒÔÓÃmakefileÅÜÆðÀ´
3. ѧ»áдÇý¶¯
µÄmakefile
4. дһ¼òµ¥charÇý¶¯£¬makefile±àÒëͨ¹ý£¬¿ÉÒÔinsmod£¬ lsmod£¬ rmmod. ÔÚÇý¶¯µÄinitº¯ÊýÀï´òÓ¡hello world£¬insmodºóÓ¦¸ÃÄܹ»Í¨¹ýdmesg¿´µ½Êä³ö
¡£
5. дһÍêÕûÇý¶¯£¬ ¼ÓÉÏread£¬ write£¬ ioctl£¬ pollingµÈ¸ ......

linuxÔÚÏßÀ©Õ¹Îļþϵͳ¿Õ¼ä

author£ºskate
time£º2009/12/04
 linuxÔÚÏßÀ©Õ¹Îļþϵͳ¿Õ¼ä
ext2resizeÊÇÒ»¿î¿ÉÒÔÔö´ó/¼õСext2/ext3ÎļþϵͳµÄ¹¤¾ß,°²×°ºóÓÐ2¸öÃüÁîext2resizeºÍext2online£¬ext2resizeÃüÁî
±ØÐëÒªÔÚжÔØÎļþϵͳµÄÇé¿öϲÅÄÜʹÓã¬ext2online¿ÉÒÔʵÏÖÔÚÏßÖØÉèÎļþϵͳ´óС¡£
ÏÂÃæ¾ÍÑÝʾ¾ßÌåµÄ²Ù×÷£¬ÕâÊÇÎÒÃÇÑз¢ÓõIJâÊÔ·þÎñ ......

ÈçºÎÔÚlinux»·¾³Ï´CVS·þÎñÆ÷

1
¡¢ÏÂÔØÔ´Âë
¡¡¡¡
´Ó
CVS
µÄ¹Ù·½ÍøÕ¾
cvshome.org
ÉÏÑ°ÕÒ£¬ÓÉÓÚ
CVS
ÀúÊ·ÉÏÒ²³öÏÖ¹ýһЩ°²È«Â©¶´£¬ËùÒÔ½¨ÒéÒª¶¨ÆÚÈ¥Æä¹Ù·½ÍøÕ¾ÉÏ¿´¿´ÓÐûÓÐ×îа汾ÍƳö¡£
¡¡¡¡
2
¡¢±àÒë°²×°
¡¡¡¡
# tar -xjpvf cvs-1.12.5.tar.bz2
¡¡¡¡
# cd cvs-1.12.5
¡¡¡¡
# ./configure --prefix=/usr/local/terry_yu/cvs
¡¡
--d ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ