{"id":272,"date":"2018-07-03T08:00:44","date_gmt":"2018-07-03T08:00:44","guid":{"rendered":"https:\/\/www.go4expert.com\/tutorials\/?p=272"},"modified":"2018-08-01T01:17:59","modified_gmt":"2018-08-01T01:17:59","slug":"local-environment-setup","status":"publish","type":"post","link":"https:\/\/www.go4expert.com\/tutorials\/local-environment-setup\/","title":{"rendered":"Local Environment Setup"},"content":{"rendered":"<p>C plus plus is a compiled based language i.e., it needs to be compiled into an object files resulting from compilation of one or multiple files and hence are linked to an executable( .exe file). This compilation is a very complex process and thus we require special software program to do it for us and these special software program are Compilers.<\/p>\n<h2><strong>For Windows users<\/strong><\/h2>\n<p>If you want to run or setup the local environment for CPP on your personal desktop running on Windows, Mac OS or any other OS you would need to have following two softwares on your desktop<br \/>\n<strong>CPP editor or any Text editor:<\/strong> This software would help you write code in your preferred language CPP, there are many advanced editor present in market which supports intelligent code completion, Real time error finding and even the advanced ones helps in debugging. Some of the good Editors are <a href=\"https:\/\/www.sublimetext.com\/\" target=\"_blank\" rel=\"noopener\">Sublime<\/a>, <a href=\"https:\/\/atom.io\/\" target=\"_blank\" rel=\"noopener\">Atom,<\/a> <a href=\"https:\/\/notepad-plus-plus.org\/\" target=\"_blank\" rel=\"noopener\">Notepad++<\/a>, vim and many more names may vary from OS to OS but these are some of the best on Windows and Mac OS.<\/p>\n<p><strong>CPP compiler:<\/strong> CPP comes under the category of compiled languages i.e., it needs to be compiled by a compiler to make desktop understand it purpose. A compiled Language is the language in which the code, once compiled is expressed as the instructions for the machine it is running on. For instance the addition operation <em>\u201c+\u201d<\/em> in the code written by you would be simply changed to <em>\u201cADD\u201d<\/em> instruction in machine code by compiler itself.<\/p>\n<p>CPP compilers compile the CPP code (Generally with extension CPP) and make it run for you just at a click of one button many of them come with inbuilt editors but there editor might not be top notch as like of sublime and atom . Some of the freely available CPP compilers are DevCPP and turbo CPP (For absolute beginners), Code blocks, Microsoft Visual Studio (For advance development for Windows and its utilities).<\/p>\n<p><strong>GCC compiler:<\/strong> GCC compiler could also be installed in Windows you need to install MinGW, it can be installed from <a href=\"http:\/\/www.mingw.org\/\" target=\"_blank\" rel=\"noopener\">MinGW official page\u00a0<\/a> download the latest version and proceed with installing it at least with libraries GCC-core, GCC-g++ and the MinGW run time, and you can install others too as per your choice and likes.<\/p>\n<p>After the installation is complete do not forget to add the bin sub directory of your MinGW installation to your System\u2019s PATH variable which can be done by simply searching on your windows for \u201cEdit Environment variables for your account\u201d then click on \u201cAdvanced\u201d tab inside it check for \u201cEnvironment Variables\u201d button inside it click open it Under the \u201cSystem Variables\u201d section (the lower half), find the row with \u201cPath\u201d in the first column, and click edit. The \u201cEdit environment variable\u201d UI will appear. Here, you can click \u201cNew\u201d and type in the new path you want to add. From this screen you can also edit or reorder them. For a visual guide you might find a video for same easily on YouTube.<\/p>\n<h2><strong>For Linux Users (You like to root? Don\u2019t worry for compiling you need not :p )<\/strong><\/h2>\n<p>Generally the latest builds of the Linux comes with pre-installed GCC but it\u2019s better to be on safe side, so by opening the terminal you could verify the presence of GCC in your machine just go to terminal and type<\/p>\n<p>g++ -v<\/p>\n<p>If GCC is installed, then message would be printed with a note about GCC version, If GCC is not installed you need to install GCC to your machine to help you compile the CPP source code, for more detail on how to install GCC click <a href=\"https:\/\/gcc.gnu.org\/install\/\" target=\"_blank\" rel=\"noopener\">here<\/a><\/p>\n<p>For editor the linux come installed with Vim but you can download any text editor as per your choice as its work is limited to writing code.<\/p>\n<h2><strong>For Mac users<\/strong><\/h2>\n<p>In Mac as well you have option to go for CPP compiler such as code blocks to go for which come with its own editor also you can use sublime, atom or notepad ++ as a substitute to it, Mac also have support for GCC and the easiest way to obtain it is to download the Xcode development environment from Apple\u2019s website and follow the simple installation instructions.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>C++ local Environment setup for Windows, Mac ,linux and other users. C++ is a compiled based language i.e., it needs to be compiled into an object files.<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_genesis_hide_title":false,"_genesis_hide_breadcrumbs":false,"_genesis_hide_singular_image":false,"_genesis_hide_footer_widgets":false,"_genesis_custom_body_class":"","_genesis_custom_post_class":"","_genesis_layout":"","jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"enabled":false},"version":2}},"categories":[2],"tags":[],"class_list":{"0":"post-272","1":"post","2":"type-post","3":"status-publish","4":"format-standard","6":"category-cpp","7":"entry"},"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v20.1 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Local Environment Setup - Go4Expert Tutorials<\/title>\n<meta name=\"description\" content=\"C++ local Environment setup for Windows, Mac ,linux and other users. C++ is a compiled based language i.e., it needs to be compiled into an object files.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.go4expert.com\/tutorials\/local-environment-setup\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Local Environment Setup - Go4Expert Tutorials\" \/>\n<meta property=\"og:description\" content=\"C++ local Environment setup for Windows, Mac ,linux and other users. C++ is a compiled based language i.e., it needs to be compiled into an object files.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.go4expert.com\/tutorials\/local-environment-setup\/\" \/>\n<meta property=\"og:site_name\" content=\"Go4Expert Tutorials\" \/>\n<meta property=\"article:published_time\" content=\"2018-07-03T08:00:44+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2018-08-01T01:17:59+00:00\" \/>\n<meta name=\"author\" content=\"shabbir\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"shabbir\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"4 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.go4expert.com\/tutorials\/local-environment-setup\/\",\"url\":\"https:\/\/www.go4expert.com\/tutorials\/local-environment-setup\/\",\"name\":\"Local Environment Setup - Go4Expert Tutorials\",\"isPartOf\":{\"@id\":\"https:\/\/www.go4expert.com\/tutorials\/#website\"},\"datePublished\":\"2018-07-03T08:00:44+00:00\",\"dateModified\":\"2018-08-01T01:17:59+00:00\",\"author\":{\"@id\":\"https:\/\/www.go4expert.com\/tutorials\/#\/schema\/person\/187ce4675295e6b09b98a9374ce2fec6\"},\"description\":\"C++ local Environment setup for Windows, Mac ,linux and other users. C++ is a compiled based language i.e., it needs to be compiled into an object files.\",\"breadcrumb\":{\"@id\":\"https:\/\/www.go4expert.com\/tutorials\/local-environment-setup\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.go4expert.com\/tutorials\/local-environment-setup\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.go4expert.com\/tutorials\/local-environment-setup\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.go4expert.com\/tutorials\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Local Environment Setup\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.go4expert.com\/tutorials\/#website\",\"url\":\"https:\/\/www.go4expert.com\/tutorials\/\",\"name\":\"Go4Expert Tutorials\",\"description\":\"Programming And Web Development Tutorials\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.go4expert.com\/tutorials\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.go4expert.com\/tutorials\/#\/schema\/person\/187ce4675295e6b09b98a9374ce2fec6\",\"name\":\"shabbir\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.go4expert.com\/tutorials\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/303ce933c6bfabf6ac58bc870c696a1d5ef98012ecb820a4a7921853b813406f?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/303ce933c6bfabf6ac58bc870c696a1d5ef98012ecb820a4a7921853b813406f?s=96&d=mm&r=g\",\"caption\":\"shabbir\"}}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Local Environment Setup - Go4Expert Tutorials","description":"C++ local Environment setup for Windows, Mac ,linux and other users. C++ is a compiled based language i.e., it needs to be compiled into an object files.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.go4expert.com\/tutorials\/local-environment-setup\/","og_locale":"en_US","og_type":"article","og_title":"Local Environment Setup - Go4Expert Tutorials","og_description":"C++ local Environment setup for Windows, Mac ,linux and other users. C++ is a compiled based language i.e., it needs to be compiled into an object files.","og_url":"https:\/\/www.go4expert.com\/tutorials\/local-environment-setup\/","og_site_name":"Go4Expert Tutorials","article_published_time":"2018-07-03T08:00:44+00:00","article_modified_time":"2018-08-01T01:17:59+00:00","author":"shabbir","twitter_card":"summary_large_image","twitter_misc":{"Written by":"shabbir","Est. reading time":"4 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.go4expert.com\/tutorials\/local-environment-setup\/","url":"https:\/\/www.go4expert.com\/tutorials\/local-environment-setup\/","name":"Local Environment Setup - Go4Expert Tutorials","isPartOf":{"@id":"https:\/\/www.go4expert.com\/tutorials\/#website"},"datePublished":"2018-07-03T08:00:44+00:00","dateModified":"2018-08-01T01:17:59+00:00","author":{"@id":"https:\/\/www.go4expert.com\/tutorials\/#\/schema\/person\/187ce4675295e6b09b98a9374ce2fec6"},"description":"C++ local Environment setup for Windows, Mac ,linux and other users. C++ is a compiled based language i.e., it needs to be compiled into an object files.","breadcrumb":{"@id":"https:\/\/www.go4expert.com\/tutorials\/local-environment-setup\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.go4expert.com\/tutorials\/local-environment-setup\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.go4expert.com\/tutorials\/local-environment-setup\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.go4expert.com\/tutorials\/"},{"@type":"ListItem","position":2,"name":"Local Environment Setup"}]},{"@type":"WebSite","@id":"https:\/\/www.go4expert.com\/tutorials\/#website","url":"https:\/\/www.go4expert.com\/tutorials\/","name":"Go4Expert Tutorials","description":"Programming And Web Development Tutorials","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.go4expert.com\/tutorials\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/www.go4expert.com\/tutorials\/#\/schema\/person\/187ce4675295e6b09b98a9374ce2fec6","name":"shabbir","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.go4expert.com\/tutorials\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/303ce933c6bfabf6ac58bc870c696a1d5ef98012ecb820a4a7921853b813406f?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/303ce933c6bfabf6ac58bc870c696a1d5ef98012ecb820a4a7921853b813406f?s=96&d=mm&r=g","caption":"shabbir"}}]}},"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p9JSSi-4o","_links":{"self":[{"href":"https:\/\/www.go4expert.com\/tutorials\/wp-json\/wp\/v2\/posts\/272","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.go4expert.com\/tutorials\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.go4expert.com\/tutorials\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.go4expert.com\/tutorials\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.go4expert.com\/tutorials\/wp-json\/wp\/v2\/comments?post=272"}],"version-history":[{"count":10,"href":"https:\/\/www.go4expert.com\/tutorials\/wp-json\/wp\/v2\/posts\/272\/revisions"}],"predecessor-version":[{"id":316,"href":"https:\/\/www.go4expert.com\/tutorials\/wp-json\/wp\/v2\/posts\/272\/revisions\/316"}],"wp:attachment":[{"href":"https:\/\/www.go4expert.com\/tutorials\/wp-json\/wp\/v2\/media?parent=272"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.go4expert.com\/tutorials\/wp-json\/wp\/v2\/categories?post=272"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.go4expert.com\/tutorials\/wp-json\/wp\/v2\/tags?post=272"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}