{"id":14730,"date":"2025-11-06T09:51:29","date_gmt":"2025-11-06T09:51:29","guid":{"rendered":"https:\/\/www.bodhost.com\/kb\/?p=14730"},"modified":"2026-02-26T14:02:06","modified_gmt":"2026-02-26T14:02:06","slug":"install-gcc-compiler-on-windows","status":"publish","type":"post","link":"https:\/\/www.bodhost.com\/kb\/install-gcc-compiler-on-windows\/","title":{"rendered":"How to Install GCC Compiler on Windows"},"content":{"rendered":"<p>The GCC (GNU Compiler Collection) is a widely used open-source compiler that supports C, C++, and several other programming languages. Although it\u2019s primarily designed for Linux systems, it can be easily installed on Windows through tools like MinGW or MSYS2.<\/p>\n<p><strong>Follow the guide:<\/strong><\/p>\n<h4><strong>Option 1: Install Using MinGW<\/strong><\/h4>\n<ol>\n<li>ownload MinGW from https:\/\/osdn.net\/projects\/mingw\/.<\/li>\n<li>Run the installer and open MinGW Installation Manager.<\/li>\n<li>In the package list, find and mark the following for installation:\n<ul>\n<li>mingw32-base<\/li>\n<li>mingw32-gcc-g++<\/li>\n<\/ul>\n<\/li>\n<li>Add the path C:\\MinGW\\bin to System Environment Variables \u2192 Path.<\/li>\n<li>Open <a href=\"https:\/\/www.bodhost.com\/kb\/change-directories-in-command-prompt\/\" target=\"_blank\" rel=\"noopener\">Command Prompt<\/a> and verify with:\n<pre><span style=\"color: #3366ff;\">gcc --version<\/span><\/pre>\n<\/li>\n<\/ol>\n<h4><strong>Option 2: Install Using MSYS2<\/strong><\/h4>\n<ol>\n<li>ownload MSYS2 from https:\/\/www.msys2.org\/.<\/li>\n<li>Open MSYS2 MSYS terminal and update packages:\n<pre><span style=\"color: #3366ff;\">pacman -Syu\r\npacman -Su<\/span><\/pre>\n<\/li>\n<li>Install GCC:\n<pre><span style=\"color: #3366ff;\">pacman -S mingw-w64-x86_64-gcc<\/span><\/pre>\n<p>Add C:\\msys64\\mingw64\\bin to your system Path.<\/li>\n<li>Verify with:\n<pre><span style=\"color: #3366ff;\">gcc --version<\/span><\/pre>\n<\/li>\n<\/ol>\n<h5><strong>Troubleshooting<\/strong><\/h5>\n<ul>\n<li>\u2018gcc\u2019 not recognized: Check if the correct bin path is added to your Path variable.<\/li>\n<li>Permission errors: Run the terminal as an administrator.<\/li>\n<\/ul>\n<p>In this manner, you can install GCC on Windows quickly using MinGW or MSYS2. Once installed, you can compile C\/C++ programs directly from the Command Prompt or your preferred IDE.<\/p>\n<p>Learn more tutorials about <a href=\"https:\/\/www.bodhost.com\/kb\/how-to-allow-customers-compiler-access-using-whm\/\" target=\"_blank\" rel=\"noopener\"><em>How to Allow Customers Compiler Access Using WHM<\/em><\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>The GCC (GNU Compiler Collection) is a widely used open-source compiler that supports C, C++, and several other programming languages. Although it\u2019s primarily designed for Linux systems, it can be&hellip;<\/p>\n<p><a href=\"https:\/\/www.bodhost.com\/kb\/install-gcc-compiler-on-windows\/\" class=\"more-link\">Read More<\/a><\/p>\n","protected":false},"author":21,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[837],"tags":[1661,1660],"class_list":["post-14730","post","type-post","status-publish","format-standard","hentry","category-tutorial","tag-gcc-compiler","tag-install-gcc-compiler-on-windows"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.7 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>How to Install GCC Compiler on Windows<\/title>\n<meta name=\"description\" content=\"Learn how to install the GCC compiler on Windows using MinGW or MSYS2. Follow the step-by-step guide to set up GCC.\" \/>\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.bodhost.com\/kb\/install-gcc-compiler-on-windows\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to Install GCC Compiler on Windows\" \/>\n<meta property=\"og:description\" content=\"Learn how to install the GCC compiler on Windows using MinGW or MSYS2. Follow the step-by-step guide to set up GCC.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.bodhost.com\/kb\/install-gcc-compiler-on-windows\/\" \/>\n<meta property=\"og:site_name\" content=\"Knowledge Base - bodHOST\" \/>\n<meta property=\"article:published_time\" content=\"2025-11-06T09:51:29+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2026-02-26T14:02:06+00:00\" \/>\n<meta name=\"author\" content=\"Serena\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Serena\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"1 minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.bodhost.com\\\/kb\\\/install-gcc-compiler-on-windows\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.bodhost.com\\\/kb\\\/install-gcc-compiler-on-windows\\\/\"},\"author\":{\"name\":\"Serena\",\"@id\":\"https:\\\/\\\/www.bodhost.com\\\/kb\\\/#\\\/schema\\\/person\\\/ffd3f118493c99471ae5bd4790a55830\"},\"headline\":\"How to Install GCC Compiler on Windows\",\"datePublished\":\"2025-11-06T09:51:29+00:00\",\"dateModified\":\"2026-02-26T14:02:06+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.bodhost.com\\\/kb\\\/install-gcc-compiler-on-windows\\\/\"},\"wordCount\":201,\"publisher\":{\"@id\":\"https:\\\/\\\/www.bodhost.com\\\/kb\\\/#organization\"},\"keywords\":[\"GCC Compiler\",\"Install GCC Compiler on Windows\"],\"articleSection\":[\"Tutorial\"],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.bodhost.com\\\/kb\\\/install-gcc-compiler-on-windows\\\/\",\"url\":\"https:\\\/\\\/www.bodhost.com\\\/kb\\\/install-gcc-compiler-on-windows\\\/\",\"name\":\"How to Install GCC Compiler on Windows\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.bodhost.com\\\/kb\\\/#website\"},\"datePublished\":\"2025-11-06T09:51:29+00:00\",\"dateModified\":\"2026-02-26T14:02:06+00:00\",\"description\":\"Learn how to install the GCC compiler on Windows using MinGW or MSYS2. Follow the step-by-step guide to set up GCC.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.bodhost.com\\\/kb\\\/install-gcc-compiler-on-windows\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.bodhost.com\\\/kb\\\/install-gcc-compiler-on-windows\\\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.bodhost.com\\\/kb\\\/install-gcc-compiler-on-windows\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Tutorial\",\"item\":\"https:\\\/\\\/www.bodhost.com\\\/kb\\\/category\\\/tutorial\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to Install GCC Compiler on Windows\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.bodhost.com\\\/kb\\\/#website\",\"url\":\"https:\\\/\\\/www.bodhost.com\\\/kb\\\/\",\"name\":\"Web Hosting Knowledge Base | bodHOST Hosting FAQ\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.bodhost.com\\\/kb\\\/#organization\"},\"alternateName\":\"Web Hosting Knowledge Base | bodHOST Hosting FAQ\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.bodhost.com\\\/kb\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.bodhost.com\\\/kb\\\/#organization\",\"name\":\"Web Hosting Knowledge Base | bodHOST Hosting FAQ\",\"url\":\"https:\\\/\\\/www.bodhost.com\\\/kb\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.bodhost.com\\\/kb\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/www.bodhost.com\\\/kb\\\/wp-content\\\/uploads\\\/2025\\\/10\\\/Profile-Pic.png\",\"contentUrl\":\"https:\\\/\\\/www.bodhost.com\\\/kb\\\/wp-content\\\/uploads\\\/2025\\\/10\\\/Profile-Pic.png\",\"width\":240,\"height\":240,\"caption\":\"Web Hosting Knowledge Base | bodHOST Hosting FAQ\"},\"image\":{\"@id\":\"https:\\\/\\\/www.bodhost.com\\\/kb\\\/#\\\/schema\\\/logo\\\/image\\\/\"}},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.bodhost.com\\\/kb\\\/#\\\/schema\\\/person\\\/ffd3f118493c99471ae5bd4790a55830\",\"name\":\"Serena\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/8bf3c9f6220a13a4d46295ad7c38a0c9e351ca3a57d0e417580c8e8b83a12a50?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/8bf3c9f6220a13a4d46295ad7c38a0c9e351ca3a57d0e417580c8e8b83a12a50?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/8bf3c9f6220a13a4d46295ad7c38a0c9e351ca3a57d0e417580c8e8b83a12a50?s=96&d=mm&r=g\",\"caption\":\"Serena\"},\"url\":\"https:\\\/\\\/www.bodhost.com\\\/kb\\\/author\\\/seema\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How to Install GCC Compiler on Windows","description":"Learn how to install the GCC compiler on Windows using MinGW or MSYS2. Follow the step-by-step guide to set up GCC.","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.bodhost.com\/kb\/install-gcc-compiler-on-windows\/","og_locale":"en_US","og_type":"article","og_title":"How to Install GCC Compiler on Windows","og_description":"Learn how to install the GCC compiler on Windows using MinGW or MSYS2. Follow the step-by-step guide to set up GCC.","og_url":"https:\/\/www.bodhost.com\/kb\/install-gcc-compiler-on-windows\/","og_site_name":"Knowledge Base - bodHOST","article_published_time":"2025-11-06T09:51:29+00:00","article_modified_time":"2026-02-26T14:02:06+00:00","author":"Serena","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Serena","Est. reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.bodhost.com\/kb\/install-gcc-compiler-on-windows\/#article","isPartOf":{"@id":"https:\/\/www.bodhost.com\/kb\/install-gcc-compiler-on-windows\/"},"author":{"name":"Serena","@id":"https:\/\/www.bodhost.com\/kb\/#\/schema\/person\/ffd3f118493c99471ae5bd4790a55830"},"headline":"How to Install GCC Compiler on Windows","datePublished":"2025-11-06T09:51:29+00:00","dateModified":"2026-02-26T14:02:06+00:00","mainEntityOfPage":{"@id":"https:\/\/www.bodhost.com\/kb\/install-gcc-compiler-on-windows\/"},"wordCount":201,"publisher":{"@id":"https:\/\/www.bodhost.com\/kb\/#organization"},"keywords":["GCC Compiler","Install GCC Compiler on Windows"],"articleSection":["Tutorial"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/www.bodhost.com\/kb\/install-gcc-compiler-on-windows\/","url":"https:\/\/www.bodhost.com\/kb\/install-gcc-compiler-on-windows\/","name":"How to Install GCC Compiler on Windows","isPartOf":{"@id":"https:\/\/www.bodhost.com\/kb\/#website"},"datePublished":"2025-11-06T09:51:29+00:00","dateModified":"2026-02-26T14:02:06+00:00","description":"Learn how to install the GCC compiler on Windows using MinGW or MSYS2. Follow the step-by-step guide to set up GCC.","breadcrumb":{"@id":"https:\/\/www.bodhost.com\/kb\/install-gcc-compiler-on-windows\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.bodhost.com\/kb\/install-gcc-compiler-on-windows\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.bodhost.com\/kb\/install-gcc-compiler-on-windows\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Tutorial","item":"https:\/\/www.bodhost.com\/kb\/category\/tutorial\/"},{"@type":"ListItem","position":2,"name":"How to Install GCC Compiler on Windows"}]},{"@type":"WebSite","@id":"https:\/\/www.bodhost.com\/kb\/#website","url":"https:\/\/www.bodhost.com\/kb\/","name":"Web Hosting Knowledge Base | bodHOST Hosting FAQ","description":"","publisher":{"@id":"https:\/\/www.bodhost.com\/kb\/#organization"},"alternateName":"Web Hosting Knowledge Base | bodHOST Hosting FAQ","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.bodhost.com\/kb\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.bodhost.com\/kb\/#organization","name":"Web Hosting Knowledge Base | bodHOST Hosting FAQ","url":"https:\/\/www.bodhost.com\/kb\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.bodhost.com\/kb\/#\/schema\/logo\/image\/","url":"https:\/\/www.bodhost.com\/kb\/wp-content\/uploads\/2025\/10\/Profile-Pic.png","contentUrl":"https:\/\/www.bodhost.com\/kb\/wp-content\/uploads\/2025\/10\/Profile-Pic.png","width":240,"height":240,"caption":"Web Hosting Knowledge Base | bodHOST Hosting FAQ"},"image":{"@id":"https:\/\/www.bodhost.com\/kb\/#\/schema\/logo\/image\/"}},{"@type":"Person","@id":"https:\/\/www.bodhost.com\/kb\/#\/schema\/person\/ffd3f118493c99471ae5bd4790a55830","name":"Serena","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/8bf3c9f6220a13a4d46295ad7c38a0c9e351ca3a57d0e417580c8e8b83a12a50?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/8bf3c9f6220a13a4d46295ad7c38a0c9e351ca3a57d0e417580c8e8b83a12a50?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/8bf3c9f6220a13a4d46295ad7c38a0c9e351ca3a57d0e417580c8e8b83a12a50?s=96&d=mm&r=g","caption":"Serena"},"url":"https:\/\/www.bodhost.com\/kb\/author\/seema\/"}]}},"_links":{"self":[{"href":"https:\/\/www.bodhost.com\/kb\/wp-json\/wp\/v2\/posts\/14730","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.bodhost.com\/kb\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.bodhost.com\/kb\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.bodhost.com\/kb\/wp-json\/wp\/v2\/users\/21"}],"replies":[{"embeddable":true,"href":"https:\/\/www.bodhost.com\/kb\/wp-json\/wp\/v2\/comments?post=14730"}],"version-history":[{"count":7,"href":"https:\/\/www.bodhost.com\/kb\/wp-json\/wp\/v2\/posts\/14730\/revisions"}],"predecessor-version":[{"id":14851,"href":"https:\/\/www.bodhost.com\/kb\/wp-json\/wp\/v2\/posts\/14730\/revisions\/14851"}],"wp:attachment":[{"href":"https:\/\/www.bodhost.com\/kb\/wp-json\/wp\/v2\/media?parent=14730"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.bodhost.com\/kb\/wp-json\/wp\/v2\/categories?post=14730"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.bodhost.com\/kb\/wp-json\/wp\/v2\/tags?post=14730"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}