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

Linux ¹²Ïí¿â±à³Ì[ת]

Linux ¹²Ïí¿â±à³Ì
×÷ÕߣºÖÕÄÏ   <li.zhongnan@hotmail.com
>
1¡¢½éÉÜ
¶¯Ì¬¿âÊdzÌÐòÉè¼Æ³£Óõļ¼Êõ£¬²ÉÓö¯Ì¬¿â¿ÉÒÔÓÐЧµÄ¼õÉÙ³ÌÐò´óС£¬½ÚÊ¡¿Õ¼ä£¬Ìá¸ßЧÂÊ£¬Ôö¼Ó³ÌÐòµÄ¿ÉÀ©Õ¹ÐÔ£¬±ãÓÚÄ£¿é»¯¹ÜÀí¡£ÔÚWindowsºÍ
Linux²Ù×÷ϵͳÖж¼Óж¯Ì¬¿âµÄ¸ÅÄî¡£Windows½«Æä³ÆΪ¶¯Ì¬Á´½Ó¿â£¨Dynamic Link
Library£¬DLL£©£¬ÆäÎļþÀ©Õ¹ÃûΪ.dll£¬Linux³ÆÆäΪ¹²Ïí¿â¼¼Êõ£¨Shared Library£©£¬ÏàÓ¦µÄ¹²Ïí¿âÎļþÀ©Õ¹ÃûΪ.so¡£
¹ÊÃû˼Ò壬¶¯Ì¬¿âÔÚ³ÌÐòÔËÐеÄʱºò±»¶¯Ì¬Á´½Ó¡£µ«ÊÇÔÚ¾ßÌåʹÓö¯Ì¬¿âµÄʱºòÈ´ÓÐÁ½ÖÖ²»Í¬µÄ·½Ê½£ºÒþʽÁ´½ÓºÍÏÔʽÁ´½Ó¡£ÒþʽÁ´½ÓÔÚ±àÒë/Á´½Ó½×¶ÎÍê
³É£¬ÓɱàÒëϵͳ¸ù¾Ý¶¯Ì¬¿âµÄÍ·ÎļþºÍ¿âÎļþ½øÐбàÒëºÍÁ´½Ó£¬´Ó¶øÈ·¶¨´ýµ÷Óõĺ¯ÊýÔ­Ðκ͵ØÖ·¡£ÏÔʽÁ´½ÓÔòÊÇÀûÓÃAPIº¯ÊýʵÏÖ¼ÓÔغÍжÔع²Ïí¿â£¬»ñÈ¡´øµ÷
Óú¯ÊýµØÖ·£¬»ñÈ¡´íÎóÐÅÏ¢µÈ¹¦ÄÜ¡£
2¡¢ÒþʽÁ´½Ó¾ÙÀý
£¨1£©¶¯Ì¬¿âÎļþ´úÂ룺dl_func.c
#include <stdio.h>
extern char name[];
int add(int a, int b)
{
        printf("calling add\n");
        printf("Hello, %s!\n", name);
        return a + b;
}
¸ÃÎļþÖеÄadd()º¯Êý¼ÆËãÁ½¸öÕûÊýÖ®ºÍ£¬²¢ÇÒ´òÓ¡Íⲿ±äÁ¿µÄÖµ£¬¸ÃÍⲿ±äÁ¿Óɵ÷Óù²Ïí¿âµÄÊÂÀý³ÌÐò¶¨Òå¡£
£¨2£©¿Í»§¶ËÊÂÀý´úÂ룺dl_demo1.c
#include <stdio.h>
#include <dlfcn.h>
int add(int a, int b);
char name[100];
int main(int argc, char *argv[]) {
        int a = 10, b = 20;
        int c = 0;
        strcpy(name, "NHN XDBMS");
        c = add(a, b);
        printf("%d + %d = %d\n", a, b, c);
        return 0;
}
¸ÃÊÂÀý³ÌÐòµ÷Óù²Ïí¿âµÄÖеÄadd()º¯Êý¼ÆËãÁ½ÊýÖ®ºó²¢´òÓ¡£¬Í¬Ê±ÔÚÊÂÀý³ÌÐòÖУ¬¸ø±äÁ¿name¸³Öµ£¬ÒÔ±ãÔÚadd()º¯ÊýÖдòÓ¡¡£
£¨3£©±àÒëÓëÔËÐÐ
±àÒë¹²Ïí¿â£º
gcc -o libdl_func.so -fPIC -rdynamic -shared dl_func.c
Ñ¡Ïî-fPICָʾ±àÒëÆ÷½«´úÂë±àÒë³ÉλÖöÀÁ¢µÄ´úÂ룬һ°ãÐèÒªÒÔ³ÌÐòÎļþ


Ïà¹ØÎĵµ£º

LinuxϵÄÓÅÐ㿪ԴÈí¼þ

1  Scilab ÏÖÔÚÓÉ Scilab
Э»áά»¤µÄ¿ª·ÅÔ´´úÂëµÄ¿Æѧ¼ÆËãÈí¼þ¡£Ëü¾ßÓоØÕóÔËËã¡¢ÊýÖµÔËËã¡¢ÐźŴ¦Àí¡¢³ÌÐòÉè¼ÆµÈ¹¦ÄÜ£¬Ä¿Ç°Òѱ»¹ã·ºÓ¦ÓÃÓÚ½ÌÓý¡¢¿ÆÑк͹¤Òµ¡£Äã¿ÉÒÔÓÃËüÀ´Ìæ´úÊշѵÄmatlab¡£http://www.scilab.org/

2 Stellarium
ÊÇÒ»¿îÐÇÏó¹Û²âÄ£ÄâÈí¼þ¡£Ä¿Ç°È«ÇòÓÐÐí¶àÌìÎÄ°®ºÃÕߺͽÌÊÚÌìÎÄѧµÄ½ÌʦÃÇÔÚÊ¹Ó ......

LinuxÏÂtar gz bz2 tgz zµÈÖÚ¶àѹËõÎļþµÄ½âѹ·½·¨

ת×Ô£ºhttp://www.51testing.com/?action-viewspace-itemid-212094.html
¶ÔÓÚ¸Õ¸Õ½Ó´¥
Linux
µÄÈËÀ´Ëµ£¬Ò»¶¨»á¸øLinuxÏÂÒ»´ó¶Ñ¸÷ʽ¸÷ÑùµÄÎļþÃû¸ø¸ãÔΡ£±ð
¸ö²»Ëµ£¬µ¥µ¥¾ÍѹËõÎļþΪÀý£¬ÎÒÃÇÖªµÀÔÚ
Windows
ÏÂ×î³£¼ûµÄѹËõÎļþ¾ÍÖ»ÓÐÁ½ÖÖ
£¬Ò»ÊÇ,zip£¬ÁíÒ»¸öÊÇ.rar¡£¿ÉÊÇLinux¾Í²»Í¬ÁË£¬ËüÓÐ.gz¡¢.tar.gz¡¢tgz¡¢bz2¡ ......

linux man ·Ç³£Ïêϸ

ʹÓÃLinuxÏÂmanÒѾ­ºÜ¾ÃÁË¡£µ«Ö»ÊÇ´ó¸ÅÖªµÀÆäÄÚÈݵĴæ·ÅĿ¼£¬ÒÔ¼°man number xxxÖÐmumberµÄº¬Òå¡£½ñÌìÐèÒªÌí¼ÓC++ man page¡£Ë³±ã½«manµÄÄÚÈÝ×÷Ò»¸ö½ÏÏêϸµÄÁ˽⡣ 0. manºóÃæÊý×ֵĺ¬Ò壺 ֮ǰSamÔÚ²éÕÒC¿âº¯Êýʱ£¬»áʹÓÃ#man 3 func ÔÚ²éÕÒϵͳµ÷ÓÃʱ£¬ÔòʹÓÃ#man 2 fork. ·ñÔòÓÐʱ»á³öÏֲ鵽ͬÃûµÄshellÖÐÃüÁîµÄÇé¿ ......

Linux shell±à³Ì


±¾ÎÄÍøÖ·:http://bbs.bitscn.com/72875 ¸´ÖÆ ¡¾×ª×Ôbbs.bitsCN.com¡¿
1. Linux ½Å±¾±àд»ù´¡
1.1 Óï·¨»ù±¾½éÉÜ
1.1.1 ¿ªÍ·
       ³ÌÐò±ØÐëÒÔÏÂÃæµÄÐпªÊ¼£¨±ØÐë·ÅÔÚÎļþµÄµÚÒ»ÐУ©£º
       #!/bin/sh
¡¡   ·ûºÅ#!ÓÃÀ´¸æËßϵͳËüºóÃæµÄ² ......

redhat linux AS4.0(U5ÆóÒµ°æ4.0£©ÏÂÔصØÖ·£¨5ÕÅÅÌ£©

×î½üÒ»Ö±Ïë×°linux  U5,һֱûÕÒµ½£¬½ñÌìÕÒµ½ÁË£¬·ÖÏí¸ø´ó¼Ò£¡£¡£¡
ftp://openware.byr.edu.cn/pub/os-images/Redhat/RHEL4u5/i386/RHEL4-U5-i386-AS-disc1.iso
 
ftp://openware.byr.edu.cn/pub/os-images/Redhat/RHEL4u5/i386/RHEL4-U5-i386-AS-disc2.iso
 
ftp://openware.byr.edu.cn/pub/os-images ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ