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

ÈçºÎÔÚLinuxʹÓÃEclipse + CDT¿ª·¢C/C++³ÌÐò?

A. ΪʲôҪÔÚLinuxʹÓÃEclipse¿ª·¢C/C++³ÌÐò?
LinuxÊÇÒ»¸öÒÔC/C++¿ª·¢ÎªÖ÷µÄƽ̨£¬ÎÞÂÛÊÇKernel»òÊÇApplication£¬Ö÷Òª¶¼Ê¹ÓÃC/C++¿ª·¢¡£´«Í³ÔÚLinuxÏ¿ª·¢³ÌÐò£¬ÊÇÔÚÎÄ×ÖģʽÏ£¬ÀûÓÃviµÈÎÄ×ֱ༭Æ÷׫дC/C++³ÌÐò´æÅ̺ó£¬ÔÚCommand lineÏÂʹÓÃgcc±àÒ룬ÈôÒªdebug£¬ÔòʹÓÃgdb¡£
ÕâÖÖ¿ª·¢·½Ê½Éú²úÁ¦²¢²»¸ß£¬ÈôÖ»ÊÇ¿ª·¢Ñ§Ï°ÓõÄС³ÌÐòÔòÓ°Ïì²»´ó£¬µ«ÈôÒª¿ª·¢´óÐÍÏîĿʱ£¬³ÌÐòµµ°¸¸öÊýÖڶ࣬ÐèÒªÓÃproject»òsolutionµÄ·½Ê½¹ÜÀí£»ÇÒdebugʱbreakpointµÄ¼ÓÈ룬µ¥²½Ö´ÐУ¬¹Û²ì±äÁ¿±ä»¯µÈ£¬¶¼ÐèÒª¸ü¿ÉÊÓ»¯µÄ·½Ê½²ÅÄܹ»Ôö¼ÓÉú²úÁ¦£»×îÖØÒªµÄ£¬ÓÉÓÚÏÖÔڵijÌÐòÓïÑԽԷdz£µÄÅÓ´ó£¬ÓÖÓи´Ôӵĺ¯Ê½¿â£¬Òª³ÌÐòÔ±Êì¼ÇËùÓеijÌÐòÓï·¨ºÍfunctionÃû³Æ£¬ÊµÔÚºÜÀ§ÄÑ£¬ËùÒÔÓï·¨Ìáʾ(Intellisense)µÄ¹¦Äܾͷdz£ÖØÒª£¬ÕâЩ¾Í±ØÐë¿¿IDEÀ´´ï³É¡£
ÔÚWindowsƽ̨ÉÏ£¬ÈôÒª¿ª·¢C/C++³ÌÐò£¬ÎÒÃÇÓÐMicrosoft Visual Studio¡¢Borland C++ Builder¿ÉÓã¬ÕâЩ¶¼ÊǺܺÃÓõÄIDE£¬µ«¿Éϧ½öÄÜÔÚWindowsÏÂʹÓ㬵«ÊÇÔÚLinuxƽ̨ÄØ?»ùÓÚÒÔÏÂÀíÓÉ£¬ÎÒÍƼöʹÓÃEclipse¿ª·¢C/C++³ÌÐò£º
1. EclipseÊÇÒ»¸öÓÃJavaËù׫дIDE£¬Òò´Ë¿É¿çƽ̨£¬ËùÒÔÔÚLinuxºÍWindowsƽ̨ϽԿÉʹÓÃEclipse£¬¿É½µµÍ³ÌÐòÔ±ÊìÎöIDEµÄѧϰÇúÏß¡£
2. EclipseËäÈ»Ö÷ÒªÄÃÀ´¿ª·¢Java³ÌÐò£¬µ«ÊÂʵÉÏEclipseΪһ¸ö¡ºÍòÓÃÓïÑÔ¡»µÄIDE£¬Ö»Òª¹ÒÉÏpluginºó£¬¾Í¿ÉÒÔÔÚEclipse¿ª·¢¸÷ÖÖÓïÑÔ³ÌÐò£¬ËùÒÔÎÒÃÇÖ»Òª¹ÒÉÏCDT(C/C++ Development Toolkit)ºó£¬¾Í¿ÉÒÔÔÚEclipse¿ª·¢C/C++³ÌÐò£¬³ý´ËÖ®Í⣬ĿǰµÄÖ÷Á÷³ÌÐòÓïÑÔ£¬ÈçC/C++¡¢C#¡¢Java¡¢PHP¡¢Perl¡¢Python¡¢Ruby¡¢Rebol¡¢JavaScript¡¢SQL¡¢XML¡¢UMLµÈ£¬½Ô¿ÉÔÚEclipseÉÏ׫д£¬ËùÒÔÖ»ÒªÊìÎöEclipseµÄIDE»·¾³£¬½«À´Èô¿ª·¢ÆäËüÓïÑÔ³ÌÐò£¬¾Í²»ÓÃÔÙÖØÐÂѧϰIDE»·¾³ÁË¡£
3. ×îÖØÒªµÄ£¬EclipseºÍCDTÊÇOpen SourceÇÒÍêÈ«Ãâ·Ñ£¬È¡µÃÏ൱ÈÝÒ×£¬ÊÂʵÉÏFedora 5ÒѾ­°üº¬EclipseºÍCDTÁË£¬ËäȻԤÉèFedara 5°²×°Ê±²¢Ã»Óк¬Eclipse£¬Ö»ÒªÊÖ¶¯ÁíÍâ¼ÓÑ¡¼´¿É¡£
B. ÈçºÎÔÚLinuxÏ°²×°EclipseºÍCDT?
i. ÓÉLinux Distribution°²×°Eclipse£¬Fedora 5¾ÍÄÚº¬EclipseºÍCDT¡£
ii. ÊÖ¶¯°²×°
1. ÏÂÔصµ°¸
A¡¢ ÏÂÔØJRE(Java Runtime Environment) ¡£(http://java.sun.com/javase/downloads/index.jsp)
B¡¢ ÏÂÔØEclipse SDK¡£(http://www.eclipse.org/downloads/)
C¡¢ ÏÂÔØCDT¡£(http://www.eclipse.org/cdt/downloads.php)
2. °²×°
A¡¢ °²×°JRE
i. [root@localhost ~]#mkdir /


Ïà¹ØÎĵµ£º

ÈçºÎʹÓ÷ºÐÍÄ£擬virtual? (C/C++) (template)

ÍøÉÏÒ»µÀ½ðɽµÄÃæÊÔÌ⣺
http://topic.csdn.net/u/20100524/14/0eff992a-2849-4db6-bdaa-d4a200e79b7c.html
Çë·Ö±ðÓÃC++µÄÃæÏò¶ÔÏóºÍ·ºÐÍ»úÖÆ£¬±àдʵÏÖTemplate MethodģʽµÄʾÀý´úÂ룬²¢±È½ÏÁ½ÖÖ·½Ê½¸÷×ÔµÄÓÅȱµã¡£
ÓÃÐ麯ÊýʵÏÖTemplate MethodµÄ·½Ê½¾Í²»¶à˵ÁË¡£Ó÷ºÐ͵ķ½Ê½ÊµÏÖ¶à̬ÔÚATLÀïÃæÓдóÁ¿µÄÓõ½£¡
·ºÐ͵ ......

Linux curlʹÓüòµ¥½éÉÜ

CurlÊÇLinuxÏÂÒ»¸öºÜÇ¿´óµÄhttpÃüÁîÐй¤¾ß£¬Æ书ÄÜÊ®·ÖÇ¿´ó¡£
1) ¶ÁÈ¡ÍøÒ³
$ curl http://www.linuxidc.com
2) ±£´æÍøÒ³
$ curl http://www.linuxidc.com > page.html
$ curl -o page.html http://www.linuxidc.com
3) ʹÓõÄproxy·þÎñÆ÷¼°Æä¶Ë¿Ú£º -x
$ curl -x 123.45.67.89:1080 -o page.html http://www.linu ......

C/C++ÖеÄÈÕÆÚºÍʱ¼ä

ͻ񻣼
±¾ÎÄ´Ó½éÉÜ»ù´¡¸ÅÄîÈëÊÖ£¬Ì½ÌÖÁËÔÚC/C++ÖжÔÈÕÆÚºÍʱ¼ä²Ù×÷ËùÓõ½µÄÊý¾Ý½á¹¹ºÍº¯Êý£¬²¢¶Ô¼Æʱ¡¢Ê±¼äµÄ»ñÈ¡¡¢Ê±¼äµÄ¼ÆËãºÍÏÔʾ¸ñʽµÈ·½Ãæ½øÐÐÁ˲ûÊö¡£±¾ÎÄ»¹Í¨¹ý´óÁ¿µÄʵÀýÏòÄãչʾÁËtime.hÍ·ÎļþÖÐÉùÃ÷µÄ¸÷ÖÖº¯ÊýºÍÊý¾Ý½á¹¹µÄÏêϸʹÓ÷½·¨¡£
¹Ø¼ü×Ö£ºUTC£¨ÊÀ½ç±ê׼ʱ¼ä£©£¬Calendar Time£¨ÈÕÀúʱ¼ä£©£¬epoch£¨Ê±¼ä ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ