Try to compile your code normally as
gcc test.c
If you get default output file a.exe,then go for
gcc test.c -o test.exe
Top answer 1 of 4
23
Try to compile your code normally as
gcc test.c
If you get default output file a.exe,then go for
gcc test.c -o test.exe
2 of 4
2
I would suggest you go through this compilation instruction :-
gcc -o test.exe test.c
I believe this code runs perfectly on your windows system.Please inform if it doesn't!
GeeksforGeeks
geeksforgeeks.org › linux-unix › gcc-command-in-linux-with-examples
gcc command in Linux with examples - GeeksforGeeks
October 4, 2025 - The most important option required while compiling a source code file is the name of the source program, rest every argument is optional like a warning, debugging, linking libraries, object file etc. There are different options in gcc command to allow the user to stop the compilation process ...
Videos
07:50
How to Compile and Run C program Using GCC on Ubuntu 24.04 LTS ...
11:37
2.2(c) - Using the gcc Compiler - YouTube
How to Compile and Run C program Using GCC Compiler ...
07:30
Compiling using GCC in Linux - YouTube
00:20
How to Use the `gcc` (Compile C Programs) Command in Linux! (Quick ...
01:45
Linux System Programming in under 3 minutes: The gcc compiler - ...
Linux Man Pages
man7.org › linux › man-pages › man1 › gcc.1.html
gcc(1) - Linux manual page
If the -Q option appears on the command line before the --help= option, then the descriptive text displayed by --help= is changed. Instead of describing the displayed options, an indication is given as to whether the option is enabled, disabled or set to a specific value (assuming that the compiler knows this at the point where the --help= option is used). Here is a truncated example from the ARM port of gcc: % gcc -Q -mabi=2 --help=target -c The following options are target specific: -mabi= 2 -mabort-on-noreturn [disabled] -mapcs [disabled] The output is sensitive to the effects of previous c
GNU
gcc.gnu.org › onlinedocs › gcc-3.2 › gcc › Invoking-GCC.html
GCC Command Options - GCC, the GNU Compiler Collection
When you invoke GCC, it normally does preprocessing, compilation, assembly and linking. The "overall options" allow you to stop this process at an intermediate stage. For example, the -c option says not to run the linker.
UCLA Computer Science
web.cs.ucla.edu › classes › fall14 › cs143 › project › cpp › gcc-intro.html
Gcc tutorial
If, for instance, the above commands were used to create "myprog", and "file1.C" was subsequently modified, then the following commands would correctly update "myprog". g++ -c file1.C g++ file1.o file2.o -o myprog Note that file2.C does not need to be recompiled, so the time required to rebuild ...
RapidTables
rapidtables.com › code › linux › gcc.html
GCC C compiler
Compile myfile.c with optimization and link to output file execfile: $ gcc -O myfile.c -o execfile · cd · cp · ls · gcc -c · gcc -D · gcc -fPIC · gcc -g · gcc -I · gcc -L -l · gcc -o · gcc -O · gcc -Wall · cat command · cd command · cp command ·
GNU
gcc.gnu.org
GCC, the GNU Compiler Collection - GNU Project
The GNU Compiler Collection includes front ends for C, C++, Objective-C, Objective-C++, Fortran, Ada, Go, D, Modula-2, COBOL, Rust, and Algol 68 as well as libraries for these languages (libstdc++,...). GCC was originally written as the compiler for the GNU operating system.
NTU
www3.ntu.edu.sg › home › ehchua › programming › cpp › gcc_make.html
GCC and Make - A Tutorial on how to compile, link and build C/C++ applications
The rule "hello.exe" then run its command "gcc -o hello.exe hello.o".
Stanford
web.stanford.edu › class › archive › cs › cs107 › cs107.1202 › resources › gcc
CS107 Compiling C Programs with GCC
This is just a quick overview on how to compile and run your own programs should you decide to do so without a Makefile. The simplest way to run gcc is to provide gcc a list of .c files: ... Note that you do not put header files (.h) into the gcc command: it reads in the header files as it compiles, based on the #include statements inside .c files.
GNU
gcc.gnu.org › onlinedocs › gcc-3.3.5 › gcc › Invoking-GCC.html
Invoking GCC - Using the GNU Compiler Collection (GCC)
When you invoke GCC, it normally does preprocessing, compilation, assembly and linking. The “overall options” allow you to stop this process at an intermediate stage. For example, the -c option says not to run the linker.
Scaler
scaler.com › home › topics › gcc command in linux
gcc Command in Linux - Scaler Topics
January 1, 2024 - The GCC command in Linux, which stands for GNU Compiler Collection, is an incredibly powerful tool used primarily for compiling and debugging programs written in C, C++, and other languages.
GNU
gcc.gnu.org › onlinedocs › gcc-3.2.2 › gcc › Invoking-GCC.html
Using the GNU Compiler Collection (GCC)
When you invoke GCC, it normally does preprocessing, compilation, assembly and linking. The "overall options" allow you to stop this process at an intermediate stage. For example, the -c option says not to run the linker.
Reddit
reddit.com › r/c_programming › what is a great, well-written tutorial on the gcc command line parameters? (please don't say to read the 8,000+ page manual)
What is a great, well-written tutorial on the GCC command ...
December 30, 2018 - According to the published Rationale document for the C standard, the authors recognize that one of C's strengths lies in the ability of non-portable programs to perform actions which are not described by the Standard, but the gcc optimizer isn't designed to work reliably when not required to do so by its authors' interpretation of the Standard. ... Also you probably already know this but -c just compiles it into a .o, and -o sets the name of your executeable if you don't want it to be a.out
TutorialsPoint
tutorialspoint.com › unix_commands › gcc.htm
gcc Command in Linux
gcc stands for GNU Compiler Collection is a command used in Linux to compile programs written in C and C++ programming language. To compile a program, you simply type the gcc followed by the name of your default source file, like gcc program.c.
Top answer 1 of 2
1
You can also get information beside man gcc (you have to change the order of your cmd)
by using
info gcc
To get a short command description type
gcc --help
For a full manual install the gcc documentation by
gccv=$(gcc --version | awk '/gcc /{print $NF}' | cut -c 1)
sudo apt install gcc-$gccv-doc
and then type
xdg-open /usr/share/doc/gcc-$gccv-doc/gcc.html
to read the gcc manual in your browser.
2 of 2
0
To view manual use this commands order:
man gcc