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

linuxϵľ²Ì¬¿âºÍ¶¯Ì¬¿âµÄ±àÒë

ÿ¸ö³ÌÐòʵÖÊÉ϶¼»áÁ´½Óµ½Ò»¸ö»òÕ߶à¸öµÄ¿â¡£±ÈÈçʹÓÃCº¯ÊýµÄ³ÌÐò»áÁ´½Óµ½CÔËÐÐʱ¿â£¬GUI³ÌÐò»áÁ´½Óµ½´°¿Ú¿âµÈµÈ¡£ÎÞÂÛÄÄÖÖÇé¿ö£¬Ä㶼»áÒª¾ö¶¨ÊÇÁ´½Óµ½¾²Ì¬¿â(static libary)»¹ÊǶ¯Ì¬¿â(dynamic libary)¡£
Á´½Óµ½¾²Ì¬¿â»áʹÄãµÄ³ÌÐòÓ·Ö×£¬²¢ÇÒÄÑÒÔÉý¼¶£¬µ«ÊÇ¿ÉÄÜ»á±È½ÏÈÝÒײ¿Êð¡£
¶øÁ´½Óµ½¶¯Ì¬¿â»áʹÄãµÄ³ÌÐòÇá±ã£¬²¢ÇÒÒ×ÓÚÉý¼¶£¬µ«ÊÇ»áÄÑÒÔ²¿Êð¡£
¾²Ì¬¿â
¾²Ì¬¿âÒ²¾ÍÏ൱ÓÚÊÇ°ÑһϵÁеÄobjectÎļþ·ÅÔÚͬһ¸öÎļþÖУ¨ÀàËÆwindowsÖеÄ.libÎļþ£©¡£µ±ÄãÌṩһ¸ö¾²Ì¬¿â¸øÁ´½ÓÆ÷ʱ£¬Á¬½ÓÆ÷½«»áËÑË÷¾²Ì¬¿â£¬´ÓÖÐÕÒµ½ËûËùÐèÒªµÄobjectÎļþ£¬ÌáÈ¡³öËûÃÇ£¬½«ËûÃÇÁ´½Óµ½ÄãµÄ³ÌÐòÖУ¬¾ÍÏñÄãÖ±½ÓÌṩÄÇЩÎļþÒ»Ñù¡£
ÈçºÎ´´½¨¾²Ì¬¿âÄØ£¿Äã¿ÉÒÔʹÓÃarÃüÁîÀ´´´½¨¡£
ÏÂÃæÎÒÃǾٸöÀý×Ó£º
test/lib/test1.c
#include <stdio.h>
int hello_world1()
{
    printf("hello world1\n");
    return 1;
}
test/lib/test2.c
#include <stdio.h>
void hello_world2()
{
    printf(" hello world2\n");
}
test/app.c
#include <stdio.h>
int main()
{
    hello_world1();
}
ÏÖÔÚÎÒÃDZàÒëËûÃǽøÈëĿ¼test/lib
$gcc -c test1.c
$gcc -c test2.c
$ls
test1.c  test1.o  test2.c  test2.o
$ar cr libtest.a test1.o test2.o
$ls
libtest.a  test1.c  test1.o  test2.c  test2.o
cr±êÖ¾¸æËßar½«objectÎļþ·â×°(archive),ÎÒÃÇ¿ÉÒÔʹÓÃnm -s ÃüÁîÀ´²é¿´.aÎļþµÄÄÚÈÝ
$nm -s libtest.a
Archive index:
hello_world1 in test1.o
hello_world2 in test2.o
test1.o:
00000000 T hello_world1
         U puts
test2.o:
00000000 T hello_world2
         U puts
ÏÖÔÚÈÃÎÒÃDZàÒëÖ÷³ÌÐò
Ê×ÏÈÍ˳ölibĿ¼
$cd ..
$gcc -o app app.c -Llib -ltest
-LÖ¸¶¨ÁËlibµÄËÑË÷·¾¶£¬-lÖ¸¶¨ÁËÁ´½ÓµÄ¿âµÄÃû×Ö-ltestÒ²¾ÍÊÇÁ´½Ólibtest.a
$./app
hello world1
hello_world1£¨£©±»´Ólibtest.aÖÐÕÒµ½²¢Á´½Ó¹ýÀ´ÁË£¬ÓÚÊÇÕû¸öµÄ¹ý³ÌÖÐûÓгöÏÖÎÊÌâ¡£
¶¯Ì¬¿â
¶¯Ì¬¿â(static lib)Ò²¿ÉÒ»Ò²¿ÉÒÔ³ÉΪ¹²Ïí¿â(shared lib),Ò»°ãµÄºó׺ÃûÊÇ.so¡£¶¯Ì¬¿âÓ뾲̬¿âÓеãÀàËÆ£¬ËûÃǶ¼ÊÇһϵÁеÄobjectÎļþµÄ¼¯ºÏ£¬Ö»ÊÇËûÃǵÄ×éÖ¯·½Ê½²»Í¬¡£Í¬ÑùËûÃǵÄÁ´½Ó·½Ê½Ò²Ê


Ïà¹ØÎĵµ£º

ʵսLinux Bluetooth±à³Ì (Æß) SDPЭÒé

Service Discovery Protocol(SDP)ÌṩһÖÖÄÜÁ¦£¬ÈÃÓ¦ÓóÌÐòÓз½·¨·¢ÏÖÄÄÖÖ·þÎñ¿ÉÓÃÒÔ¼°ÕâÖÖ·þÎñµÄÌØÐÔ¡£
·þÎñ·¢ÏÖЭÒé(SDP»òBluetooth SDP)ÔÚÀ¶ÑÀЭÒéÕ»ÖжÔÀ¶ÑÀ»·¾³ÖеÄÓ¦ÓóÌÐòÓÐÌØÊâµÄº¬Ò⣬·¢ÏÖÄĸö·þÎñÊÇ¿ÉÓõĺÍÈ·¶¨ÕâЩ¿ÉÓ÷þÎñµÄÌØÕ÷¡£SDP¶¨ÒåÁËbluetooth client·¢ÏÖ¿ÉÓÃbluetooth server·þÎñºÍËüÃǵÄÌØÕ÷µÄ·½·¨¡£ ......

Linux viÃüÁîÊÖ²á

viÊÇËùÓÐUNIXϵͳ¶¼»áÌṩµÄÆÁÄ»±à¼­Æ÷£¬ËüÌṩÁËÒ»¸öÊÓ´°É豸£¬Í¨¹ýËü¿ÉÒԱ༭Îļþ¡£µ±È»£¬¶ÔUNIXϵͳÂÔÓÐËùÖªµÄÈË£¬»ò¶à»òÉÙ¶¼¾õµÃvi³¬¼¶ÄÑÓ㬵«viÊÇ×î»ù±¾µÄ±à¼­Æ÷£¬ËùÒÔÏ£Íû¶ÁÕßÄܺúðÑËüѧÆðÀ´£¬ÒÔºóÔÚUNIXÊÀ½çÀï±Ø½«³©ÐÐÎÞ×è¡¢ÓÎÈÐÓÐÓ࣬ÒòΪÆäËû¼¸ÖÖÎı¾´¦ÀíÆ÷²¢·ÇUNIX±ê×¼Å䱸¡£Ëµ²»¶¨±ðÈ˵ÄLinux»úÆ÷û°²×°joe»ò ......

ÎÒÔÚlinuxϳ£ÓõÄÈí¼þ

1.  ÊäÈë·¨£ºIbus¡£·Ç³£ºÃÓ㬿ÉÒÔ¼ÇÒä´ÊÓïµÄʹÓÃƵÂÊ£¬Ò²ÄÜÖÇÄÜÆ´Òô£¬¿ÉÒÔ°²×°¶àÖÖÊäÈë·¨£¬ÄÚǶ¡£
2.  ä¯ÀÀÆ÷£ºfirefox¡£
3.  Îļþ²îÒì±È½ÏÆ÷£º meld diff viewer¡£
4.  office:  Ê×µ±Æä³åµÄopen office£¡£¡
5.  ÉãÏñÍ·£º cheese webcam booth¡£ÅÄÕÕ»¹ÓÐģʽѡÔñ¡£
6. Îļþͬ²½£ºGrsyn ......

linux³£ÓÃÃüÁµä

ÔÚÏò´ó¼ÒÏêϸ½éÉÜlinux±àÒë֮ǰ£¬Ê×ÏÈÈôó¼ÒÁ˽âÏÂLinux½Å±¾ShellÃüÁȻºó½²½âÔÚshell½Å±¾ÖпÉÒÔʹÓÃÈÎÒâµÄunixÃüÁî¡£
Óï·¨»ù±¾½éÉÜ
1.¿ªÍ·
³ÌÐò±ØÐëÒÔÏÂÃæµÄÐпªÊ¼£¨±ØÐë·½ÔÚÎļþµÄµÚÒ»ÐУ©£º
#!/bin/sh
·ûºÅ#!ÓÃÀ´¸æËßϵͳËüºóÃæµÄ²ÎÊýÊÇÓÃÀ´Ö´ÐиÃÎļþµÄ³ÌÐò¡£ÔÚÕâ¸öÀý×ÓÖÐÎÒÃÇʹÓÃ/bin/shÀ´Ö´ÐгÌÐò¡£
µ±±à¼­ºÃ ......

linuxÃüÁîÖ´Ðеķ½Ê½

     ¸Õ¿ªÊ¼½Ó´¥linux£¬²»ÖªµÀlinuxÃüÁîµ½µ×ÔõôִÐУ¬¾õµÃËüÀïÃæµÄ¸÷¸ö²ÎÊýÄÇô¶à£¬µ½µ×ÄÄÑù×ÓÓÃÄØ£¬¾­¹ý¼¸ÌìµÄ×ܽᣬ½áºÏÄñ¸çµÄ˽·¿²Ë£¬ÈçÏ£º
     command [-options]... parameter1 paremeter2 ...
    ˵Ã÷£º
     0. Ò»ÐÐÃüÁîÖеÚÒ» ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ