×ðÁú¿­Ê±

ÔÚLinuxϵͳÉÏʹÓÃCLion¾ÙÐÐǶÈëʽC/C++¿ª·¢µÄÉèÖü¼ÇÉ

ÔÚlinuxϵͳÉÏʹÓÃclion¾ÙÐÐǶÈëʽc/c++¿ª·¢µÄÉèÖü¼ÇÉ

Ëæ×ÅǶÈëʽϵͳµÄÒ»Ö±Éú³¤£¬C/C++ÈÔÈ»ÊÇ¿ª·¢Ç¶ÈëʽӦÓóÌÐòµÄÖ÷ÒªÓïÑÔ¡£¶øÔÚ¿ª·¢Àú³ÌÖУ¬ºÏÊʵļ¯³É¿ª·¢ÇéÐΣ¨IDE£©¹ØÓÚÌá¸ß¿ª·¢Ð§ÂÊÖÁ¹ØÖ÷Òª¡£CLionÊÇÒ»¿îÓÉJetBrains¿ª·¢µÄ¿çƽ̨µÄC/C++¿ª·¢ÇéÐΣ¬ËüÌṩÁËÇ¿Ê¢µÄ¹¦Ð§ºÍÓѺõÄÓû§½çÃ棬ʹµÃǶÈëʽ¿ª·¢±äµÃÔ½·¢ÇáËɺ͸ßЧ¡£

±¾ÎĽ«ÏÈÈÝÔõÑùÔÚLinuxϵͳÉÏÉèÖÃCLion¾ÙÐÐǶÈëʽC/C++¿ª·¢£¬²¢ÌṩһЩÊÊÓõļ¼ÇɺʹúÂëʾÀý¡£

×°ÖÃCLion

Ê×ÏÈ£¬ÎÒÃÇÐèÒª´ÓJetBrains¹ÙÍøÏÂÔØCLionµÄ×°Öðü¡£Æ¾Ö¤ÄãµÄLinux¿¯Ðа棬ѡÔñ¶ÔÓ¦µÄ×°Öðü¾ÙÐÐÏÂÔØ¡£×°ÖÃÍê³Éºó£¬·­¿ªCLion²¢½øÈë³õʼÉèÖá£

ÉèÖñàÒëÆ÷ºÍ¹¹½¨ÏµÍ³

ÔÚ³õʼÉèÖýçÃæÖУ¬Ñ¡Ôñ”Toolchains”Ñ¡Ï²¢µã»÷”+”ͼ±êÌí¼ÓÒ»¸öеıàÒëÆ÷¡£Æ¾Ö¤ÄãµÄÐèҪѡÔñGCC»òÕßClang×÷Ϊ±àÒëÆ÷¡£È»ºó£¬µã»÷”OK”ÉúÑÄÉèÖá£

Á¬Ã¦Ñ§Ï°¡°C++Ãâ·ÑѧϰÌõ¼Ç£¨ÉîÈ룩¡±£»

½ÓÏÂÀ´£¬Ñ¡Ôñ”Build, Execution, Deployment”Ñ¡Ïµã»÷”Toolchains”ҳǩ£¬ÔÚÓÒ²àÑ¡ÔñÊʲÅÌí¼ÓµÄ±àÒëÆ÷£¬²¢ÎªÆäÖ¸¶¨Â·¾¶¡£µã»÷”OK”ÉúÑÄÉèÖá£

½¨ÉèÏîÄ¿

ÔÚCLionÖУ¬¿ÉÒÔͨ¹ýÒÔÏÂÁ½ÖÖ·½·¨½¨ÉèÏîÄ¿£º

·½·¨Ò»£º´ÓÒѱ£´æµÄÔ´ÂëÖе¼Èë

ÈôÊÇÒÑÓÐÒ»¸öǶÈëʽÏîÄ¿µÄÔ´´úÂ룬¿ÉÒÔÑ¡Ôñ”Open Project”È»ºóµ¼ÈëÔ´ÂëĿ¼£¬CLion½«×Ô¶¯Ê¶±ðÏîÄ¿µÄCMakeLists.txtÎļþ²¢¾ÙÐÐÉèÖá£

·½·¨¶þ£º´ÓÄ£°å½¨ÉèÐÂÏîÄ¿

ÈôÊÇûÓÐÏֳɵÄÔ´Â룬¿ÉÒÔÑ¡Ôñ”New Project”½¨ÉèÒ»¸öÐÂÏîÄ¿¡£ÔÚÏîÄ¿ÉèÖÃÖÐÑ¡ÔñǶÈëʽ¹¤¾ßÁ´£¬CLion½«»áΪÄã×Ô¶¯ÌìÉúÊʺÏǶÈëʽ¿ª·¢µÄCMakeLists.txtÎļþ¡£

ÉèÖõ÷ÊÔÆ÷

ÔÚ”Run”²Ëµ¥ÏÂÑ¡Ôñ”Edit Configurations”£¬µã»÷”+”ͼ±êÌí¼ÓÒ»¸öеÄÉèÖá£Ñ¡Ôñ”C++ Remote Debug”×÷ΪÉèÖÃÀàÐÍ£¬²¢¾ÙÐÐÒÔÏÂÉèÖãº

Name£ºÉèÖõÄÃû³Æ

Executable£ºÑ¡Ôñ±àÒëºóµÄ¿ÉÖ´ÐÐÎļþ·¾¶

GDB/CDB Debugger£ºÑ¡ÔñºÏÊʵĵ÷ÊÔÆ÷£¨ÀýÈ磬GDB for Linux£©

Connection£ºÉèÖÃÖ÷»úºÍ¶Ë¿Ú£¨ÀýÈ磬localhost:1234£©

µã»÷”OK”ÉúÑÄÉèÖá£

ÔËÐк͵÷ÊÔ

ÔÚCLionÖУ¬¿ÉÒÔͨ¹ýÒÔÏÂÁ½ÖÖ·½·¨ÔËÐк͵÷ÊÔǶÈëʽӦÓóÌÐò£º

·½·¨Ò»£ºÍâµØÔËÐÐ

µã»÷”Run”°´Å¥£¨ÂÌÉ«Èý½ÇÐΣ©£¬CLion½«»áͨ¹ýSSHÅþÁ¬µ½Ä¿µÄ×°±¸£¬È»ºóÔÚÆäÖÐÔËÐÐÓ¦ÓóÌÐò¡£

·½·¨¶þ£ºÔ¶³ÌÔËÐÐ

µã»÷”Run”²Ëµ¥ÏµĔAttach to Local Process”£¬Ñ¡Ôñ֮ǰÉèÖõÄÔ¶³Ìµ÷ÊÔÉèÖá£CLion½«»áͨ¹ýGDBЧÀÍÆ÷ÅþÁ¬µ½Ä¿µÄ×°±¸µÄµ÷ÊÔÆ÷£¬²¢¾ÙÐÐÔ¶³Ìµ÷ÊÔ¡£

ÆäËû³£Óü¼ÇÉ

×Ô¶¯Íê³É£ºCLionÌṩÁËÇ¿Ê¢µÄ´úÂë×Ô¶¯ÍêÀÖ³ÉÄÜ£¬Í¨¹ý¿ì½Ý¼ü£¨ÀýÈçCtrl+Space£©¿ÉÒÔ¿ìËÙ²¹È«´úÂë¡£

´úÂëµ¼º½£ºCLionÖ§³Ö¿ìËÙÌøתµ½½ç˵¡¢Éó²éº¯ÊýŲÓò㼶µÈ¹¦Ð§£¬Í¨¹ý¿ì½Ý¼ü£¨ÀýÈçCtrl+Êó±ê×ó¼ü£©¿ÉÒÔÀû±ãµØ¾ÙÐдúÂëµ¼º½¡£

´úÂëÖع¹£ºCLionÌṩÁ˸»ºñµÄ´úÂëÖع¹¹¦Ð§£¬°üÀ¨ÖØÃüÃû¡¢ÌáÈ¡º¯Êý¡¢ÌáÈ¡±äÁ¿µÈ£¬Í¨¹ý¿ì½Ý¼ü£¨ÀýÈçShift+F6£©¿ÉÒÔÀû±ãµØ¾ÙÐдúÂëÖع¹¡£

°æ±¾¿ØÖÆ£ºCLion¶Ô³£¼ûµÄ°æ±¾¿ØÖÆϵͳ£¨ÈçGit£©ÌṩÁ˼¯³ÉÖ§³Ö£¬¿ÉÒÔÀû±ãµØ¾ÙÐдúÂëÌá½»¡¢À­È¡µÈ²Ù×÷¡£

×ÛÉÏËùÊö£¬CLionÊÇÒ»¿îÇ¿Ê¢¶øÒ×ÓõÄǶÈëʽC/C++¿ª·¢ÇéÐΣ¬ÔÚLinuxϵͳÉϾÙÐÐǶÈëʽ¿ª·¢Ê®·ÖÀû±ã¡£Í¨¹ý׼ȷÉèÖúÍÏàʶCLionµÄһЩ¼¼ÇÉ£¬¿ÉÒÔÌá¸ß¿ª·¢Ð§ÂÊ£¬¼ÓËÙÏîÄ¿µÄ¿ª·¢Àú³Ì¡£

´úÂëʾÀý£º

include

int main() {

printf("Hello, CLion for Embedded Development!

µÇ¼ºó¸´ÖÆ

“);

return 0;

µÇ¼ºó¸´ÖÆ

}

ÒÔÉÏÊÇÒ»¸ö¼òÆÓµÄCÓïÑÔ´úÂëʾÀý£¬ÓÃÓÚÔÚ¿ØÖÆ̨Êä³öÒ»ÌõÐÅÏ¢¡£Í¨¹ýCLionµÄ±à¼­Æ÷£¬ÎÒÃÇ¿ÉÒÔÀû±ãµØ±à¼­ºÍÔËÐÐÕâÑùµÄǶÈëʽӦÓóÌÐò£¬²¢¾ÙÐе÷ÊԺͲâÊÔ¡£

ÒÔÉϾÍÊÇÔÚLinuxϵͳÉÏʹÓÃCLion¾ÙÐÐǶÈëʽC/C++¿ª·¢µÄÉèÖü¼ÇɵÄÏêϸÄÚÈÝ£¬¸ü¶àÇë¹Ø×¢±¾ÍøÄÚÆäËüÏà¹ØÎÄÕ£¡

ÃâÔð˵Ã÷£ºÒÔÉÏչʾÄÚÈÝȪԴÓÚÏàÖúýÌå¡¢ÆóÒµ»ú¹¹¡¢ÍøÓÑÌṩ»òÍøÂçÍøÂçÕûÀí£¬°æȨÕùÒéÓë±¾Õ¾Î޹أ¬ÎÄÕÂÉæ¼°¿´·¨Óë¿´·¨²»´ú±í×ðÁú¿­Ê±ÂËÓÍ»úÍø¹Ù·½Ì¬¶È£¬Çë¶ÁÕß½ö×ö²Î¿¼¡£±¾ÎĽӴýתÔØ£¬×ªÔØÇë˵Ã÷À´ÓÉ¡£ÈôÄúÒÔΪ±¾ÎÄÇÖÕ¼ÁËÄúµÄ°æȨÐÅÏ¢£¬»òÄú·¢Ã÷¸ÃÄÚÈÝÓÐÈκÎÉæ¼°ÓÐÎ¥¹«µÂ¡¢Ã°·¸Ö´·¨µÈÎ¥·¨ÐÅÏ¢£¬ÇëÄúÁ¬Ã¦ÁªÏµ×ðÁú¿­Ê±ÊµÊ±ÐÞÕý»òɾ³ý¡£

Ïà¹ØÐÂÎÅ

ÁªÏµ×ðÁú¿­Ê±

18523999891

¿É΢ÐÅÔÚÏß×Éѯ

ÊÂÇéʱ¼ä£ºÖÜÒ»ÖÁÖÜÎ壬9:30-18:30£¬½ÚãåÈÕÐÝÏ¢

QR code
¡¾ÍøÕ¾µØͼ¡¿¡¾sitemap¡¿