What is gcc?Gcc- stands for GNU C/C++ Compiler- a popular console-based compiler for *NIX platforms and others; can cross-...
OptionsThere are alot of them, but there are some the most oftenused ones:To compile: -cSpecify output filename: -o <filen...
OptionsThere are zillions of them, but there are some the mostoften used ones:To compile: -cSpecify output filename: -o <f...
Options: -c- gcc performs compilation and assembly of thesource file without linking.- The output are usually object code ...
Options: -o <filename>- Places resulting file into the filename specified insteadof the default one.- Can be used with any...
Upcoming SlideShare
Loading in …5
×

GCC

473 views
359 views

Published on

Published in: Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
473
On SlideShare
0
From Embeds
0
Number of Embeds
4
Actions
Shares
0
Downloads
8
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

GCC

  1. 1. What is gcc?Gcc- stands for GNU C/C++ Compiler- a popular console-based compiler for *NIX platforms and others; can cross-compile code for various architectures- gcc to compile C programs; g++ for C++- can actually work also with ADA, Java, and a couple other languages- gcc performs all of these: 1. preprocessing, 2. compilation, 3. assembly, and 4. linkingAs always: there is man gcc
  2. 2. OptionsThere are alot of them, but there are some the most oftenused ones:To compile: -cSpecify output filename: -o <filename>Include debugging symbols: -gShow all (most) warnings: -Wall
  3. 3. OptionsThere are zillions of them, but there are some the mostoften used ones:To compile: -cSpecify output filename: -o <filename>Include debugging symbols: -gShow all (most) warnings: -WallBe stubborn about standards: -ansi and -pedanticOptimizations: -O, -O*
  4. 4. Options: -c- gcc performs compilation and assembly of thesource file without linking.- The output are usually object code files, .o;they can later be linked and form the desiredexecutables.- Generates one object file per source filekeeping the same prefix (before .) of the filename.
  5. 5. Options: -o <filename>- Places resulting file into the filename specified insteadof the default one.- Can be used with any generated files (object,executables, assembly, etc.)- If you have the file called source.c; the defaults are:source.o if -c was specifieda.out if executable- These can be overridden with the -o option.

×