ºìÁªLinuxÃÅ»§
Linux°ïÖú

linux C±à³Ì£¨1£©£­£­¿âÎļþ

·¢²¼Ê±¼ä:2006-08-13 16:07:39À´Ô´:ºìÁª×÷Õß:flycocoon
¡¡¡¡¿âÎļþÊÇһЩԤÏȱàÒëºÃµÄº¯ÊýµÄ¼¯ºÏ£¬ÄÇЩº¯Êý¶¼ÊÇ°´ÕÕ¿ÉÔÙʹÓõÄÔ­Ôò±àдµÄ¡£ËüÃÇͨ³£ÓÉÒ»×黥Ïà¹ØÁªµÄÓÃÀ´Íê³ÉijÏî³£¼û¹¤×÷µÄº¯Êý¹¹³É¡£±ÈÈçÓÃÀ´´¦ÀíÆÁÄ»ÏÔʾÇé¿öµÄº¯Êý(curses¿â)µÈ

¡¡¡¡±ê×¼µÄϵͳ¿âÎļþÒ»°ã±£´æÔÚ/lib»òÕß/usr/lib×ÓĿ¼Àï¡£±àÒëʱҪ¸æËß CÓïÑÔ±àÒëÆ÷(¸üÈ·ÇеØ˵ÊÇÁ´½Ó³ÌÐò)Ӧȥ²éÕÒÄÄЩ¿âÎļþ¡£Ä¬ÈÏÇé¿öÏ£¬ËüÖ»»á²éÕÒ CÓïÑԵıê×¼¿âÎļþ¡£ÕâÊÇ´Ó¼ÆËã»úËٶȻ¹ºÜÂý¡¢CPU¼Û¸ñ»¹ºÜ°º¹óµÄÄê´úÒÅÁôÏÂÀ´µÄÎÊÌâ¡£ÔÚµ±Ê±£¬°ÑÒ»¸ö¿âÎļþ·Åµ½±ê×¼»¯×ÓĿ¼ÀïÈ»ºó¼ÄÏ£ÍûÓÚ±àÒëÆ÷×Ô¼ºÕÒµ½ËüÊDz»Êµ¼ÊµÄ¡£¿âÎļþ±ØÐë×ñÊØÒ»¶¨µÄÃüÃû¹æÔò£¬»¹±ØÐëÔÚÃüÁîÐÐÉÏÃ÷È·µØ¸ø³öÀ´¡£

¡¡¡¡¿âÎļþµÄÃû×ÖÓÀÔ¶ÒÔlibÕ⼸¸ö×Öĸ´òÍ·£¬ËæºóÊÇ˵Ã÷º¯Êý¿âÇé¿öµÄ²¿·Ö(±ÈÈçÓÃc±íʾÕâÊÇÒ»¸ö CÓïÑԿ⣻¶øm±íʾÕâÊÇÒ»¸öÊýѧÔËËã¿âµÈ)¡£ÎļþÃûµÄ×îºó²¿·ÖÒÔÒ»¸ö¾äµã(.)¿ªÊ¼£¬È»ºó¸ø³öÕâ¸ö¿âÎļþµÄÀàÐÍ£¬ÈçÏÂËù¡¡Ê¾£º

¡ñ .a ´«Í³µÄ¾²Ì¬Ðͺ¯Êý¿â¡£

¡ñ .soºÍ. sa ¹²ÏíÐͺ¯Êý¿â(¼ûÏÂÃæµÄ½âÊÍ)¡£

¡¡¡¡º¯Êý¿âÒ»°ã·ÖΪ¾²Ì¬ºÍ¹²ÏíÁ½ÖÖ¸ñʽ£¬ÓÃls /usr/libÃüÁî²éһϾÍÄÜ¿´µ½¡£ÔÚ֪ͨ±àÒëÆ÷²éÕÒij¸ö¿âÎļþµÄʱºò£¬¼È¿ÉÒÔ¸ø³öÆäÍêÕûµÄ·¾¶Ãû£¬Ò²¿ÉÒÔʹÓÃ-l±êÖ¾¡£

1. ¾²Ì¬¿â

¡¡¡¡º¯Êý¿â×î¼òµ¥µÄÐÎʽ¾ÍÊÇÒ»×é´¦ÓÚ¿ÉÒÔ¡°ÄÃÀ´¾ÍÓá±×´Ì¬ÏµĶþ½øÖÆÄ¿±ê´úÂëÎļþ¡£µ±ÓгÌÐòÐèÒªÓõ½º¯Êý¿âÖеÄij¸öº¯Êýʱ£¬¾Í»áͨ¹ý includeÓï¾äÒýÓöԴ˺¯Êý×ö³öÉùÃ÷µÄÍ·Îļþ¡£±àÒëÆ÷ºÍÁ´½Ó³ÌÐò¸ºÔð°Ñ³ÌÐò´úÂëºÍ¿âº¯Êý½áºÏÔÚÒ»Æð³ÉΪһ¸ö¶ÀÁ¢µÄ¿ÉÖ´ÐгÌÐò¡£Èç¹ûʹÓõIJ»ÊDZê×¼µÄCÓïÑÔÔËÐпâ¶øÊÇij¸öÀ©Õ¹¿â£¬¾Í±ØÐëÓÃ-lÑ¡ÏîÖ¸¶¨Ëü¡£

¡¡¡¡¾²Ì¬¿âÒ²½Ð×öµµ°¸(archive)£¬ËüÃǵÄÎļþÃû°´¹ßÀý¶¼ÒÔ. a½áβ¡£±ÈÈç CÓïÑÔ±ê×¼¿âΪ/usr/lib/libc.a¡¢X11¿âΪ/usr/X11R6/lib/libX11.aµÈ¡£

¡¡¡¡×Ô¼º½¨Á¢ºÍά»¤¾²Ì¬¿âµÄ¹¤×÷²¢²»À§ÄÑ£¬ÓÃar(¡°½¨Á¢µµ°¸¡±µÄÒâ˼)³ÌÐò¾Í¿ÉÒÔ×öµ½£¬ÁíÍâҪעÒâµÄÊÇ£¬Ó¦¸ÃÓÃgcc -cÃüÁî¶Ôº¯Êý·Ö±ð½øÐбàÒë¡£Ó¦¸Ã¾¡Á¿°Ñº¯Êý·Ö±ð±£´æµ½²»Í¬µÄÔ´´úÂëÎļþÀïÈ¥¡£Èç¹ûº¯ÊýÐèÒª´æÈ¡ÆÕͨÊý¾Ý£¬¿ÉÒÔ°ÑËüÃǷŵ½Í¬Ò»¸öÔ´´úÂëÎļþÀﲢʹÓÃÔÚÆäÖÐÉùÃ÷ΪstaticÀàÐ͵ıäÁ¿¡£

2. ¹²Ïí¿â

¡¡¡¡¾²Ì¬¿âµÄȱµãÊÇ£¬Èç¹ûÎÒÃÇÔÚͬһʱ¼äÔËÐжà¸ö³ÌÐò¶øËüÃÇÓÖ¶¼Ê¹ÓÃ×ÅÀ´×Ôͬһ¸öº¯Êý¿âÀïµÄº¯Êýʱ£¬ÄÚ´æÀï¾Í»áÓÐÐí¶à·Ýͬһº¯ÊýµÄ±¸·Ý£¬ÔÚ³ÌÐòÎļþ±¾ÉíÒ²ÓÐÐí¶à·ÝͬÑùµÄ±¸·Ý¡£Õâ»áÏûºÄ´óÁ¿±¦¹óµÄÄÚ´æºÍÓ²Å̿ռ䡣

¡¡¡¡Ðí¶àUNIXϵͳ֧³Ö¹²Ïí¿â£¬Ëüͬʱ¿Ë·þÁËÔÚÕâÁ½·½ÃæµÄÎÞνÏûºÄ¡£

¡¡¡¡¹²Ïí¿âµÄ´æ·ÅλÖú;²Ì¬¿âÊÇÒ»ÑùµÄ£¬µ«ÓÐ×Ų»Í¬µÄÎļþºó׺¡£ÔÚÒ»¸öµäÐ굀 LinuxϵͳÉÏ£¬CÓïÑÔ±ê×¼¿âµÄ¹²Ïí°æ±¾ÊÇ /usr/lib/libc.so N£¬ÆäÖеÄNÊÇÖ÷°æ±¾ºÅ¡£
ÎÄÕÂÆÀÂÛ

¹²ÓÐ 6 ÌõÆÀÂÛ

  1. carlote ÓÚ 2007-11-12 23:25:52·¢±í:

    Ö§³Ö

  2. ±±´°ÓÎ¿Í ÓÚ 2007-08-08 15:18:54·¢±í:

    »¹Ã»Óп´Ã÷°×¾ÍûÓÐÁË£¬ÉÙÁ˵ã

  3. june.t ÓÚ 2007-08-08 15:16:18·¢±í:

    лл £¬Ñ§Ï°ÖУ¡

  4. duncan.king ÓÚ 2006-08-27 15:02:22·¢±í:

    Ê®·Ö¸Ðл

  5. licq2000 ÓÚ 2006-08-25 11:14:03·¢±í:

    лл£¬·Ç³£²»´í

  6. »µ»µ´óÉÙ ÓÚ 2006-08-25 10:30:27·¢±í:

    ѧϰÖÐ,лл·ÖÏí~~~~~~~~