{"id":11,"date":"2019-04-03T11:21:47","date_gmt":"2019-04-03T11:21:47","guid":{"rendered":"https:\/\/www.kindsonthegenius.com\/cplusplus\/?p=11"},"modified":"2019-04-05T19:03:37","modified_gmt":"2019-04-05T19:03:37","slug":"01-c-installation-and-setup","status":"publish","type":"post","link":"https:\/\/www.kindsonthegenius.com\/cplusplus\/01-c-installation-and-setup\/","title":{"rendered":"C++ Installation and Setup"},"content":{"rendered":"<p>In this lesson, we are going to learn how to install and setup C++ IDE and compiler in our computer. IDE stands for Integrated Development Environment. You use an IDE to write programs.<\/p>\n<p>However, you also need a compiler. A compiler enables you to convert your program into machine codes. In this case, the IDE we would use is Eclipse while the compiler would be MinGW.<\/p>\n<ul>\n<li>First we install the IDE. We would use Eclipse IDE<\/li>\n<li>Then we install and configure MinGW C++ Compiler<\/li>\n<\/ul>\n<p>This is because, unlike some other IDEs, MinGW C++ compiler needs to be installed separately.<\/p>\n<p>&nbsp;<\/p>\n<p>This installation works for both Windows, MacOS and Linux OS. There are <em><strong>six steps<\/strong> <\/em>you need to follow to setup C++ IDE and compiler. They are:<\/p>\n<p><strong>Step 1: Install Eclipe<\/strong>: You can download Eclipse from <a href=\"https:\/\/www.eclipse.org\/downloads\/download.php?file=\/oomph\/epp\/2019-03\/R\/eclipse-inst-win64.exe\">here<\/a>.<\/p>\n<p>&nbsp;<\/p>\n<p><strong>Step 2: Install Eclipse IDE for C++<\/strong>: Simply run the installer and install Eclipse installer for C++. After the installation, you will have a desktop icon with the name: <strong>Eclipse Cpp 2018-09<\/strong>.<\/p>\n<p>&nbsp;<\/p>\n<p><strong>Step 3: Install CDT<\/strong>: CDT Stands for C++ Development Tools. You need to add it to eclipse. To do this, open Eclipse. Then click on the help menu and choose Install New Software.<\/p>\n<p>Help &gt; Install New Software<\/p>\n<p>In the Available Software Window, in the box next to &#8216;Work With&#8217; just type CDT.<\/p>\n<p>This would filter for CDT.<\/p>\n<p>This is shown below<\/p>\n<p>&nbsp;<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-14 \" src=\"https:\/\/www.kindsonthegenius.com\/cplusplus\/wp-content\/uploads\/sites\/17\/2019\/04\/CDT-Window-for-C.jpg\" alt=\"CDT Window for C++ for Eclipse\" width=\"680\" height=\"505\" srcset=\"https:\/\/www.kindsonthegenius.com\/cplusplus\/wp-content\/uploads\/sites\/17\/2019\/04\/CDT-Window-for-C.jpg 971w, https:\/\/www.kindsonthegenius.com\/cplusplus\/wp-content\/uploads\/sites\/17\/2019\/04\/CDT-Window-for-C-300x223.jpg 300w, https:\/\/www.kindsonthegenius.com\/cplusplus\/wp-content\/uploads\/sites\/17\/2019\/04\/CDT-Window-for-C-768x570.jpg 768w\" sizes=\"auto, (max-width: 680px) 100vw, 680px\" \/><\/p>\n<p>&nbsp;<\/p>\n<p>Select the first Item that displays. (CDT &#8211; http:\/\/download.eclipse.org\/tools\/cdt\/releases\/9.5)<\/p>\n<p>Then expand CDT Main Features<\/p>\n<p>Select the two items:<\/p>\n<ul>\n<li>C\/C++ Development Tools<\/li>\n<li>C\/C++ Development Tools SDK<\/li>\n<\/ul>\n<p>This is shown in the figure below<\/p>\n<p>&nbsp;<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-15 size-large\" src=\"https:\/\/www.kindsonthegenius.com\/cplusplus\/wp-content\/uploads\/sites\/17\/2019\/04\/C-Development-Tools-Selection-1024x766.jpg\" alt=\"C++ Development Tools Selection\" width=\"640\" height=\"479\" srcset=\"https:\/\/www.kindsonthegenius.com\/cplusplus\/wp-content\/uploads\/sites\/17\/2019\/04\/C-Development-Tools-Selection-1024x766.jpg 1024w, https:\/\/www.kindsonthegenius.com\/cplusplus\/wp-content\/uploads\/sites\/17\/2019\/04\/C-Development-Tools-Selection-300x224.jpg 300w, https:\/\/www.kindsonthegenius.com\/cplusplus\/wp-content\/uploads\/sites\/17\/2019\/04\/C-Development-Tools-Selection-768x575.jpg 768w, https:\/\/www.kindsonthegenius.com\/cplusplus\/wp-content\/uploads\/sites\/17\/2019\/04\/C-Development-Tools-Selection.jpg 1350w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><\/p>\n<p>&nbsp;<\/p>\n<p>After the selection, the click on Next and complete the installation<\/p>\n<p>&nbsp;<\/p>\n<p><strong>Step 4: Download MinGW:<\/strong> Visit the site <a href=\"https:\/\/sourceforge.net\/projects\/mingw-w64\/\" class=\"broken_link\">https:\/\/sourceforge.net\/projects\/mingw-w64\/<\/a> and download MinGW for 32 and 64 bits.<\/p>\n<p>&nbsp;<\/p>\n<p><strong>Step 5: Install MinGW:<\/strong> Run the MinGW installer to install MinGW. I recommend you install it in drive C<\/p>\n<p>&nbsp;<\/p>\n<p><strong>Step 6: Add MinGW to PATH<\/strong>: Go to the installation folder of MinGW. Copy the path. Than add it to the path variable.<\/p>\n<p>To do this go to My Computer Properties. Click on the Advanced Tab. Then click on Environment Variables.<\/p>\n<p>Select PATH. Click on Edit. Then click on New. Then path the path you copied. Then click on OK.<\/p>\n<p>&nbsp;<\/p>\n<p>At this point, you are ready to write C++ programs!<\/p>\n<p><a href=\"https:\/\/youtu.be\/Z10CDIxbjok\">You can watch the video below for clarifications.<\/a><\/p>\n<p>&nbsp;<\/p>\n<p><iframe loading=\"lazy\" src=\"https:\/\/www.youtube.com\/embed\/Z10CDIxbjok\" width=\"100%\" height=\"315\" frameborder=\"0\" allowfullscreen=\"allowfullscreen\"><span data-mce-type=\"bookmark\" style=\"display: inline-block; width: 0px; overflow: hidden; line-height: 0;\" class=\"mce_SELRES_start\">\ufeff<\/span><\/iframe><\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>In this lesson, we are going to learn how to install and setup C++ IDE and compiler in our computer. IDE stands for Integrated Development &hellip; <\/p>\n","protected":false},"author":1,"featured_media":16,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2],"tags":[6,3,4,5],"class_list":["post-11","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-c-tutorials","tag-c-compiler","tag-c-tutorials","tag-cdt","tag-mingw"],"_links":{"self":[{"href":"https:\/\/www.kindsonthegenius.com\/cplusplus\/wp-json\/wp\/v2\/posts\/11","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.kindsonthegenius.com\/cplusplus\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.kindsonthegenius.com\/cplusplus\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.kindsonthegenius.com\/cplusplus\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.kindsonthegenius.com\/cplusplus\/wp-json\/wp\/v2\/comments?post=11"}],"version-history":[{"count":2,"href":"https:\/\/www.kindsonthegenius.com\/cplusplus\/wp-json\/wp\/v2\/posts\/11\/revisions"}],"predecessor-version":[{"id":17,"href":"https:\/\/www.kindsonthegenius.com\/cplusplus\/wp-json\/wp\/v2\/posts\/11\/revisions\/17"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.kindsonthegenius.com\/cplusplus\/wp-json\/wp\/v2\/media\/16"}],"wp:attachment":[{"href":"https:\/\/www.kindsonthegenius.com\/cplusplus\/wp-json\/wp\/v2\/media?parent=11"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.kindsonthegenius.com\/cplusplus\/wp-json\/wp\/v2\/categories?post=11"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.kindsonthegenius.com\/cplusplus\/wp-json\/wp\/v2\/tags?post=11"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}