You can see this in your directory using the ls command, but don't try to edit "a.out", since … Type gcc filename.c; If no error occur you will see new command line.If any open file and rectify. Ans then you can use this abc.o file to create .so file. GCC (GNU Compiler Collection) A Brief History and Introduction to GCC. For creating so many files, all you need is a correct c code written in a .c file. Over the next few minutes, I’ll let you know the easiest way to Compile and Run C Program in Windows 10 Using Command Prompt. But I will show you how to install GCC on wide variety of Linux distributions. Its a very popular and powerful compiler used for compilation of C code. Let’s get started. In the next step, we can run the program. So when you run gcc -o abc.c abc.o an object file would be generated. xyz is the name of the output file.-lm is an option to link againt the math library (libm). I also tried: > minGW foo.c I will use Debian 9 Stretch for the demonstration. In this article, I will show you how to install GCC and compile C programs in Linux using GCC. So when you run gcc -o abc.c abc.o an object file would be generated. To compile a C program, give it a filename ending in ``.c'', for example ``prog.c'' then compile it by typing: eris% gcc prog.c This creates an executable file known as a.out. Before you compile and run the above C program. Compiling C++ program. Note that the header file 'hello.h' is not specified in the list of files on the command line. Now, I am using Ubuntu Linux. You certainly shouldn't include .o files in C source files, which would just be really weird, and gcc won't compile.o files, but your command line in your example would work fine if there was a main function in it. With this we come to the end of this blog on ‘How To Compile C program in Command Prompt’. To compile a C program, give it a filename ending in ``.c'', for example ``prog.c'' then compile it by typing: eris% gcc prog.c This creates an executable file known as a.out. If a specific output file name is desired then this can be done using -o option. The original GNU C Compiler (GCC) is developed by Richard Stallman, the founder of the GNU Project.Richard Stallman founded the GNU project in 1984 to create a complete Unix-like operating system as free software, to promote freedom and cooperation among computer users and programmers. This command will produce an output file with default name a.out. -Wall will give you all the warnings and errors. $ gcc -Wall main.c hello_fn.c -o newhello In this case, we use the -o option to specify a different output file for the executable, 'newhello'. For a basic compilation, gcc works as : gcc helloworld.c. Compiling C program. To compile C program first.c, and create an executable file called first, enter: $ gcc first.c -o first OR $ cc first.c -o first To execute program first, enter: $ ./first Output: My first C program.