![]() After reading this I also found a great article on using Visual Studio Code on Win10 and mingw - code. Open a Command Prompt Terminal and try typing gcc -version and press Enter. Click on OK, and OK and close the other windows. Some systems show a good UI for adding a New Path easily by clicking New, else you just need to add at the end and add the following path. At the bottom "System Variables" panel, look for a Variable named "Path" and double click on it. This article is written so that the installation process is made easier than most of the trashy articles I had to go through. The compiled file will be saved in the same directory with the name a the name can be different for you. Writing gcc will invoke the C compiler for windows. To compile the Hello World code that we wrote earlier, type gcc Hello. Now, click on the address bar in the C program's directory, type cmd, and press Enter. Here we write a program to print hello world to demonstrate this step and save the file as Hello. Type the code in the notepad and save the file with the. Step 2: Type the C code and Save the file. To execute a C program, create a text file in any directory of your choice. Paste the path of the MinGW bin that was copied earlier and click on Ok. In the User variables for the User section, select the path and click on the Edit button. Navigate to the search bar and type Edit the system environment variables and click on open to continue to edit system environment variables. ![]() That is the main reason to set the environment path variable. To set the compiler's path, we need the path to the bin directory of MinGW. Follow the steps below to set the environment path variable for MinGW on the Windows system. It makes the alias name for the compiler, which denotes the path. The environment path variable helps to detect the compiler in your whole system. Now the installation of MinGW is finished.Ĭurrently, the command prompt cannot detect the MinGW compiler GCC because the environment path variable has not been set. Now the installation has been completed, click on Close to close the Installation manager. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |