¹¹½¨»ù±¾µÄLinux C ±à³Ì»·¾³ £¨×ªµÄÔõôÊղز»ÁË£©
¹¹½¨»ù±¾µÄLinux C ±à³Ì»·¾³ ÊÕ²Ø
±¾ÎÄ»ùÓÚdebian-40r0(ÄÚºË2.6.18)½éÉÜÒ»ÏÂÈçºÎÔÚÒ»¸ö±ê׼ϵͳÖй¹½¨Linux CµÄ»ù±¾±à³Ì¿ª·¢»·¾³¡£
Ò»¸öÍêÕûµÄ¿ª·¢»·¾³Ö÷Òª°üÀ¨Ëĸö²¿·Ö£º±ê×¼C¿â¡¢Í·Îļþ¡¢¹¤¾ßÁ´¡¢±à¼Æ÷¡¢°ïÖúÎĵµ£¬ÏÂÃæÒÀ´Î½éÉÜ¡£
±ê×¼C¿âglibc
glibcÊÇgnu·¢²¼µÄlibc¿â£¬¼´cÔËÐп⡣glibcÊÇlinuxϵͳÖÐÄÚºËÖ®ÉÏ×îµ×²ãµÄapi£¬¼¸ºõÆäËüÈκεÄÔËÐпⶼ»áÒÐÀµÓÚglibc¡£glibc³ýÁË·â×°linux²Ù×÷ϵͳËùÌṩµÄϵͳ·þÎñÍ⣬Ëü±¾ÉíÒ²ÌṩÁËÐí¶àÆäËüһЩ±ØÒª¹¦ÄÜ·þÎñµÄʵÏÖ£¬Ö÷ÒªµÄÈçÏ£º
(1)string£¬×Ö·û´®´¦Àí
(2)signal£¬ÐźŴ¦Àí
(3)dlfcn£¬¹ÜÀí¹²Ïí¿âµÄ¶¯Ì¬¼ÓÔØ
(4)direct£¬ÎļþĿ¼²Ù×÷
(5)elf£¬¹²Ïí¿âµÄ¶¯Ì¬¼ÓÔØÆ÷£¬¼´interpreter
(6)iconv£¬²»Í¬×Ö·û¼¯µÄ±àÂëת»»
(7)inet£¬socket½Ó¿ÚµÄʵÏÖ
(8)intl£¬¹ú¼Ê»¯£¬¼´gettextµÄʵÏÖ
(9)io£¬»ù±¾IO²Ù×÷
(10)linuxthreads£¬Ïß³Ì
(11)locale£¬±¾µØ»¯
(12)login£¬ÐéÄâÖÕ¶ËÉ豸µÄ¹ÜÀí£¬¼°ÏµÍ³µÄ°²È«·ÃÎÊ
(13)malloc£¬¶¯Ì¬ÄÚ´æµÄ·ÖÅäÓë¹ÜÀí
(14)nis
(15)stdlib£¬ÆäËü»ù±¾¹¦ÄÜ
»ùÓÚglibc¿âµÄÖØÒªÐÔ£¬ÒѾװºÃµÄlinuxϵͳ£¬»ù±¾É϶¼»áÓÐglibc¿â¡£
¿ÉÒÔͨ¹ýÈçÏÂÃüÁî²é¿´ÏµÍ³Ä¿Ç°ÒѾ°²×°µÄglibc¿â¼°Ïà¹ØÌ×¼þ
dpkg -l | grep 'GNU C Library'
Í·Îļþ
Ðí¶àÐÂÊÖÑ¡Ôñ×Ô¼º¶¨ÖÆÈí¼þ°üÀ´°²×°linux£¬ÍùÍù»áÍü¼Ç°²×°Í·ÎļþµÈÏà¹ØµÄÈí¼þ°ü£¬µ¼Ö±àÒëʱÎÞ·¨Í¨¹ý£¬±¨ÀàËÆÏÂÃæµÄ´íÎó:
error: stdio.h: No such file or directory
¿ÉÒÔͨ¹ýÏÂÃæµÄÃüÁî°²×°Í·ÎļþÒÔ¼°¿ª·¢¿â
apt-get install libc6-dev
¹¤¾ßÁ´
´ÓÀíÂÛÉÏ˵±àÒëÒ»¸ö³ÌÐòÒÀ´ÎÐèÒªÏÂÃ漸¸ö¹¤¾ß£ºCÔ¤´¦ÀíÆ÷-->´Ê·¨·ÖÎöÆ÷-->´úÂëÉú³ÉÆ÷-->ÓÅ»¯Æ÷-->»ã±à³ÌÐò-->Á´½ÓÆ÷¡£linuxÏÂÓÐÁ½¸öÈí¼þ°übinutils¡¢gcc°üÀ¨ÁËÉÏÃæµÄËùÓй¤¾ß¡£
1. binutils¹¤¾ß
Binutils ÊÇÒ»×éºÜÖØÒªµÄ¿ª·¢¹¤¾ß£¬°üÀ¨Á´½ÓÆ÷(ld)¡¢»ã±àÆ÷(as)¡¢·´»ã±àÆ÷(objdump)ºÍÆäËûÓÃÓÚÄ¿±êÎļþºÍµµ°¸µÄ¹¤¾ß(ar)£¬Ò²ÊÇgccµÄÒÀÀµÏî¡£
¿ÉÒÔͨ¹ýÏÂÃæµÄÃüÁî°²×°
apt-get install binutils
2. gcc(gnu collect compiler)
gccÍê³ÉÁË´Ó"CÔ¤´¦ÀíÆ÷"µ½"ÓÅ»¯Æ÷"µ
Ïà¹ØÎĵµ£º
1) ÓÀ¾ÃÐÔÉúЧ£¬ÖØÆôºó²»»á¸´Ô
¿ªÆô£º chkconfig iptables on
¹Ø±Õ£º chkconfig iptables off
2) ¼´Ê±ÉúЧ£¬ÖØÆôºó¸´Ô
¿ªÆô£º service iptables start
¹Ø±Õ£º service iptables stop
ÐèҪ˵Ã÷µÄÊǶÔÓÚLinuxϵÄÆäËü·þÎñ¶¼¿ÉÒÔÓÃÒÔÉÏÃüÁîÖ´ÐпªÆôºÍ¹Ø±Õ²Ù×÷¡£
ÔÚ¿ªÆôÁË·À»ðǽʱ£¬×öÈçÏÂÉèÖ㬿ªÆôÏà¹Ø¶Ë¿Ú£¬ ......
ODBCºÍIDAPIÖ®Õù
µ±MicrosoftÔÚÖ𽥵Ļ÷°ÜËûµÄ¾ºÕù¶ÔÊÖ£¬²¢ÇÒÓµÓÐÁ˴󲿷ÝPCÊý¾Ý¿âÊг¡Ö®ºó£¬±ãÂýÂýµÄÁ˽⵽ÕÆÎÕ±ê×¼µÄÖØÒªÐÔ¡£´ËÍâMicrosoftΪÁËͳһ¸÷Ó¦ÓóÌÐòÖ®¼ä²»Í¬×ÊÁϵĴæÈ¡£¬Òò´Ë¿ªÊ¼Öƶ¨´æÈ¡×ÊÁϵÄͳһ±ê×¼-ODBC¡£Microsoft¸ü´óµÄÄ¿µÄÊÇΪÁË×¼±¸ºÍÃé×¼ÏÂÒ»³¡µÄ´óÕ½£¬ÄǾÍÊÇPCÉϵÄRDBMS²úÆ·¡£µ±È»Microsoft Ҫһͳ ......
×î½üÔÚ¿´¡¶c³ÌÐòÉè¼ÆÓïÑÔ¡·£¬¾ÍÊÇÄDZ¾±»ÓþΪCÓïÑÔÊ¥¾µÄÊé¼®¡£¼¸Ìì¿´ÁËÒ»Õ£¬¸Ð´¥ºÜ´ó£¬¿ªÆª¾ÍÉæ¼°µ½ºÜ¶àʵÓóÌÐò£¬²»ÏñÌ·ºÆÇ¿ÄÇÑùÈÃÈËÉîÏÝÓ﷨ϸ½ÚÖ®ÖУ¬¶øÇÒѧÍêÌ·µÄÊé¸Ð¾õʲô¶¼²»ÄÜ×ö¡£ºÜ¶àÎÊÌâÌ·¶¼»Ø±ÜÁË¡£Ëùνרҵ¿´¿´c³ÌÐòÉè¼ÆÓïÑԵĴúÂëµÄ·ç¸ñ¾ÍÄܸÐÊܵ½£¬Ò»ÖÖ¾«Ðĵñ×ÁµÄÒÕÊõÆ·¡£µÚÒ»ÕÂÓÐ ......
Ç°ÑÔ ²»¶ÏÓÐÍøÓѽ«±àÒëÆ÷ GCC ÎóÈÏΪ IDE£¨¼¯³É¿ª·¢»·¾³£©
ÆÚÍûÍÑÀëÃüÁîÐÐ
ÆÚÍûÄÜÔڲ˵¥Öз¢ÏÖÆäÉíÓ°
ÆÚÍûÆäÄÜÓÐÒ»¸ö¼¯±à¼±àÒëÁ´½Óµ÷ÊÔÔËÐÐÓÚÒ»ÌåµÄ½çÃæ
¹Ê±¾Îĸø´ó¼Ò¼òµ¥ÂÞÁÐһЩ C/C++ ±à³ÌÖпÉÓÃµÄ IDE£¬»òÐíÄã´ÓÖпÉÒÔÕÒÒ»¸öÄãϲ»¶µÄ¡£
Ϊ±ÜÃâÒÔÏÂij¸öÈí¼þ°²×°Ê±²»×Ô¶¯°²×° ......
C/C++ ³£¼ûÎóÇø
1. C++ËäÈ»Ö÷ÒªÊÇÒÔCµÄ»ù´¡·¢Õ¹ÆðÀ´µÄÒ»ÃÅÐÂÓïÑÔ£¬µ«Ëý²»ÊÇCµÄÌæ´úÆ·£¬²»ÊÇCµÄÉý¼¶£¬C++ºÍCÊÇÐֵܹØϵ¡£Ã»ÓÐ˱ÈËÏȽøµÄ˵·¨£¬¸üÖØÒªµÄÒ»µãÊÇCºÍC++¸÷×Եıê׼ίԱ»áÊǶÀÁ¢µÄ£¬×îеÄC++±ê×¼ÊÇC++98£¬×îеÄC±ê×¼ÊÇC99¡£Òò´ËҲûÓÐÏÈѧCÔÙ˵C++µÄ˵·¨£¬Ò²²»ÔÙ£¨×¢ÒâÕâ¸ö"²»ÔÙ"£©ÓÐC++Óï·¨ ......