saving . . . saved Creation and execution of C Programmes in Windows environment using MinGW compiler has been deleted. Creation and execution of C Programmes in Windows environment using MinGW compiler has been hidden .
Creation and execution of C Programmes in Windows environment using MinGW compiler
Title
Question
Dear Sir/Madam, I have successfully installed MinGW compiler on my \r\nsystem in windows environment. But in tutorial segment the demo has been\r\n given only of program execution in ubuntu operating system. So kindly \r\nguide me how to use this MinGW compiler in windows environment.
Thanks & regards
Suneel

C-and-Cpp First-C-Program 00-01 min 0-10 sec 03-08-16, 3:24 p.m. suneel

Answers:

Greetings Suneel,

Kindly have a look on the C and C++ Installation & Instruction Sheet from the following links to proceed further.

<a href="http://spoken-tutorial.org/media/videos/43/C-and-Cpp-Installation-Sheet-English.pdf" style="line-height: 1.42857; background-color: rgb(250, 250, 250);" target="_blank" title="Installation Sheet">Installation Sheet</a>

<a href="http://spoken-tutorial.org/media/videos/43/C-and-Cpp-Instruction-Sheet-English.pdf" target="_blank" title="Instruction Sheet">Instruction Sheet</a>
03-08-16, 3:32 p.m. pravin1389
I have performed all the steps as given in the installation sheet. The issue is that in the tutorial only the way to execute the program in ubuntu is demonstrated but their is no demonstration of "creating and executing the program in windows environment".
04-08-16, 11:45 a.m. suneel

<span style="font-size:14.0pt;font-family: &quot;Times New Roman&quot;,&quot;serif&quot;">GCC and GCC++ compiler download in Windows</span>

<span style="font-size:14.0pt;font-family:&quot;Times New Roman&quot;,&quot;serif&quot;;mso-fareast-font-family: &quot;Times New Roman&quot;">1.<span style="font-variant-numeric: normal; font-variant-east-asian: normal; font-stretch: normal; font-size: 7pt; line-height: normal; font-family: &quot;Times New Roman&quot;;">     </span></span><span style="font-size:14.0pt;font-family:&quot;Times New Roman&quot;,&quot;serif&quot;">Weblink for software download:<o:p></o:p></span>

<a href="https://gcc.gnu.org/install/binaries.html"><span style="font-size:14.0pt;font-family:&quot;Times New Roman&quot;,&quot;serif&quot;">https://gcc.gnu.org/install/binaries.html</span></a><span style="font-size:14.0pt;font-family:&quot;Times New Roman&quot;,&quot;serif&quot;"><o:p></o:p></span>

<span style="font-size:14.0pt;font-family:&quot;Times New Roman&quot;,&quot;serif&quot;"> </span>

<span style="font-size:14.0pt;font-family:&quot;Times New Roman&quot;,&quot;serif&quot;;mso-fareast-font-family: &quot;Times New Roman&quot;">2.<span style="font-variant-numeric: normal; font-variant-east-asian: normal; font-stretch: normal; font-size: 7pt; line-height: normal; font-family: &quot;Times New Roman&quot;;">     </span></span><span style="font-size:14.0pt;font-family:&quot;Times New Roman&quot;,&quot;serif&quot;">Windows version:<o:p></o:p></span>

<a href="https://sourceware.org/cygwin/"><span style="font-size:14.0pt;font-family:&quot;Times New Roman&quot;,&quot;serif&quot;">https://sourceware.org/cygwin/</span></a><span style="font-size:14.0pt;font-family:&quot;Times New Roman&quot;,&quot;serif&quot;"><o:p></o:p></span>

<span style="font-size:14.0pt;font-family:&quot;Times New Roman&quot;,&quot;serif&quot;"> </span>

<span style="font-size:14.0pt;font-family:&quot;Times New Roman&quot;,&quot;serif&quot;;mso-fareast-font-family: &quot;Times New Roman&quot;">3.<span style="font-variant-numeric: normal; font-variant-east-asian: normal; font-stretch: normal; font-size: 7pt; line-height: normal; font-family: &quot;Times New Roman&quot;;">     </span></span><span style="font-size:14.0pt;font-family:&quot;Times New Roman&quot;,&quot;serif&quot;">Download 64 bit version by click on EXE file</span>

<span style="font-size:14.0pt;font-family:&quot;Times New Roman&quot;,&quot;serif&quot;;mso-fareast-font-family: &quot;Times New Roman&quot;">4.<span style="font-variant-numeric: normal; font-variant-east-asian: normal; font-stretch: normal; font-size: 7pt; line-height: normal; font-family: &quot;Times New Roman&quot;;">     </span></span><span style="font-size:14.0pt;font-family:&quot;Times New Roman&quot;,&quot;serif&quot;">Connect to internet and install this with admin privilege <o:p></o:p></span>

<span style="font-size:14.0pt;font-family:&quot;Times New Roman&quot;,&quot;serif&quot;">
</span>

04-12-21, 7:08 p.m. Rsenthil_1976
GCC and GCC++ compiler download in Windows

1.<span style="white-space:pre"> </span>Weblink for software download:
https://gcc.gnu.org/install/binaries.html

2.<span style="white-space:pre"> </span>Windows version:
https://sourceware.org/cygwin/

3.<span style="white-space:pre"> </span>Download 64 bit version by click on EXE file:
 

 
4.<span style="white-space:pre"> </span>Connect to internet and install this with admin privilege 

04-12-21, 7:09 p.m. Rsenthil_1976

Login to add comment


Dear Suneel,
Try this link<a href="https://turboc.codeplex.com/downloads/get/1489512" target="" title="C++ Turbo"> C++ Turbo</a> and download the zip file. Install the executable file.
08-08-16, 3:04 p.m. mailtofaisalrahman@gmail.com
How to compile and execute a C and C++ program using GCC compiler?

1.<span style="white-space:pre"> </span>Type the following program in notepad or notepad++

// First C Program
#include<stdio.h>
int main()
{
 printf("Talk to a Teacher\n");
 return 0;
 }

2.<span style="white-space:pre"> </span>Save the program with .c extension in the folder where you have installed GCC compiler and cygwin. In my Laptop, I have installed in

C:\cygwin64\bin>

Filename:  Tutorial1.c

3.<span style="white-space:pre"> </span>Compile the program in the command prompt with admin privilege :

C:\cygwin64\bin>gcc -o hello Tutorial1.c

If the program doesn’t have error, an EXE file name hello.exe created in the same folder.

4.<span style="white-space:pre"> </span>Run the program (EXE file hello.exe) in the command prompt:

C:\cygwin64\bin>hello

A message will be displayed in the cmd window for this program:

Talk to a Teacher

04-12-21, 7:11 p.m. Rsenthil_1976
How to compile and execute a C and C++ program using GCC compiler?

1.<span style="white-space:pre"> </span>Type the following program in notepad or notepad++

// First C Program
#include<stdio.h>
int main()
{
 printf("Talk to a Teacher\n");
 return 0;
 }

2.<span style="white-space:pre"> </span>Save the program with .c extension in the folder where you have installed GCC compiler and cygwin. In my Laptop, I have installed in

C:\cygwin64\bin>

Filename:  Tutorial1.c

3.<span style="white-space:pre"> </span>Compile the program in the command prompt with admin privilege :

C:\cygwin64\bin>gcc -o hello Tutorial1.c

If the program doesn’t have error, an EXE file name hello.exe created in the same folder.

4.<span style="white-space:pre"> </span>Run the program (EXE file hello.exe) in the command prompt:

C:\cygwin64\bin>hello

A message will be displayed in the cmd window for this program:

Talk to a Teacher

04-12-21, 7:11 p.m. Rsenthil_1976
How to compile and execute a C and C++ program using GCC compiler?

1.<span style="white-space:pre"> </span>Type the following program in notepad or notepad++

// First C Program
#include<stdio.h>
int main()
{
 printf("Talk to a Teacher\n");
 return 0;
 }

2.<span style="white-space:pre"> </span>Save the program with .c extension in the folder where you have installed GCC compiler and cygwin. In my Laptop, I have installed in

C:\cygwin64\bin>

Filename:  Tutorial1.c

3.<span style="white-space:pre"> </span>Compile the program in the command prompt with admin privilege :

C:\cygwin64\bin>gcc -o hello Tutorial1.c

If the program doesn’t have error, an EXE file name hello.exe created in the same folder.

4.<span style="white-space:pre"> </span>Run the program (EXE file hello.exe) in the command prompt:

C:\cygwin64\bin>hello

A message will be displayed in the cmd window for this program:

Talk to a Teacher

04-12-21, 7:11 p.m. Rsenthil_1976
How to compile and execute a C and C++ program using GCC compiler?

1.<span style="white-space:pre"> </span>Type the following program in notepad or notepad++

// First C Program
#include<stdio.h>
int main()
{
 printf("Talk to a Teacher\n");
 return 0;
 }

2.<span style="white-space:pre"> </span>Save the program with .c extension in the folder where you have installed GCC compiler and cygwin. In my Laptop, I have installed in

C:\cygwin64\bin>

Filename:  Tutorial1.c

3.<span style="white-space:pre"> </span>Compile the program in the command prompt with admin privilege :

C:\cygwin64\bin>gcc -o hello Tutorial1.c

If the program doesn’t have error, an EXE file name hello.exe created in the same folder.

4.<span style="white-space:pre"> </span>Run the program (EXE file hello.exe) in the command prompt:

C:\cygwin64\bin>hello

A message will be displayed in the cmd window for this program:

Talk to a Teacher

04-12-21, 7:12 p.m. Rsenthil_1976

Login to add comment


1. Write the program in Notepad++ in some folder in a drive (E.g. Create a folder programinDdrive)

#include<stdio.h>
void main()
{
printf("hello");
}

Give a file name Sample.cand Click File menu and save it

Take command prompt by typing cmd in Run
Then change directory to the place where you saved the file (E.g your file Sample. c is in D:\\program)
Type
D:
cd program
(This will give a prompt D:\\program>)

2. COMPILE THE PROGRAM
Type
gcc Sample.c -o sample
(Here sample.exe will become the name of the output file)
press enter key
This will compile the program
If no error nothing will be shown. Otherwise it will show error details then correct the error and again compile)

/If no error RUN the program
type
sample.exe

Regards
Renetha J.B
15-02-20, 7:12 a.m. renethajb
Dear Ms.Renetha,
While following the instructions for Windows, while compiling, I got the below error :
fatal error : studio.h : No such file or directory
#include<studio.h>
compilation terminated^

Could you please support on this error

Regards,
Jagadeesh S
20-05-20, 11:43 a.m. jagadeesh17
question reverted. error identified.
Sorry
20-05-20, 2:10 p.m. jagadeesh17

Login to add comment


Dear Ms.Renetha,
While following the instructions for Windows, while compiling, I got the below error :
fatal error : studio.h : No such file or directory
#include<studio.h>
compilation terminated^

Could you please support on this error

Regards,
Jagadeesh S
20-05-20, 11:43 a.m. jagadeesh17
question reverted. Error identified 
Sorry
20-05-20, 2:10 p.m. jagadeesh17

Login to add comment


Log-in to answer to this question.