SlideShare a Scribd company logo
1
GCC Compiler
Presented by: Anil pokhrel
BscCSIT 6th semester
2
Contents
• History of GCC
• Introduction to GCC
• Options in GCC
• Conclusion
History of GCC
• 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.
4
Introduction to 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 with also Java and a couple other
languages
To compile: -c
1. gcc performs compilation and assembly of the source
file without linking.
2. The output are usually object code files, .o; they can
later be linked and form the desired executables.
3. Generates one object file per source file keeping the
same prefix (before .) of the filename.
4. gcc main.c
Options: -o <filename>
• Places resulting file into the filename specified instead
of 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 specified
• a.out if executable
• These can be overridden with the -o option.
• gcc main.c -o main
Options: -g
•Includes debugging info in the generated object code.
This info can later be used in gdb.
•gcc allows to use -g with the optimization turned on (-O)
in case there is a need to debug or trace the optimized
code.
Options: -Wall
• Shows most of the warnings related to possibly incorrect code.
• Wall is a combination of a large common set of the -W options
together. These typically include:
• unused variables
• possibly uninitialized variables when in use for the first time
• defaulting return types
• missing braces and parentheses in certain context that make
it ambiguous
• etc.
Options: -ansi
• For those who are picky about standard compliance
and to ensures the code compiled complies with the
ANSI C standard;
• These options can be quite annoying for those who
don’t know C well since gcc will refuse to compile
unkosher C code, which otherwise it has no problems
with.
• $ gcc -Wall -ansi main.c -o main
Conclusion
Refferences
• https://www.geeksforgeeks.org/gcc-command-in-linux-
with-examples/
• https://www.rapidtables.com/code/linux/gcc.html
• https://en.wikipedia.org/wiki/GNU_Compiler_Collection
• https://www.thegeekstuff.com/2012/10/gcc-compiler-
options/
13

More Related Content

What's hot

Object oriented programming c++
Object oriented programming c++Object oriented programming c++
Object oriented programming c++
Ankur Pandey
 
Linker and Loader
Linker and Loader Linker and Loader
Linker and Loader
sonalikharade3
 
Unit 4 sp macro
Unit 4 sp macroUnit 4 sp macro
Unit 4 sp macro
Deepmala Sharma
 
G++ & GCC
G++ & GCCG++ & GCC
G++ & GCC
Beste Ekmen
 
Functions in C
Functions in CFunctions in C
Functions in C
Kamal Acharya
 
Introduction to method overloading &amp; method overriding in java hdm
Introduction to method overloading &amp; method overriding  in java  hdmIntroduction to method overloading &amp; method overriding  in java  hdm
Introduction to method overloading &amp; method overriding in java hdm
Harshal Misalkar
 
Command line arguments
Command line argumentsCommand line arguments
Command line arguments
Ashok Raj
 
Static typing vs dynamic typing languages
Static typing vs dynamic typing languagesStatic typing vs dynamic typing languages
Static typing vs dynamic typing languages
Jawad Khan
 
Python programming : Inheritance and polymorphism
Python programming : Inheritance and polymorphismPython programming : Inheritance and polymorphism
Python programming : Inheritance and polymorphism
Emertxe Information Technologies Pvt Ltd
 
structured programming
structured programmingstructured programming
structured programming
Ahmad54321
 
Introduction to c#
Introduction to c#Introduction to c#
Memory Management in OS
Memory Management in OSMemory Management in OS
Memory Management in OS
vampugani
 
Normal forms cfg
Normal forms   cfgNormal forms   cfg
Normal forms cfg
Rajendran
 
Function in c program
Function in c programFunction in c program
Function in c program
umesh patil
 
1. over view and history of c
1. over view and history of c1. over view and history of c
1. over view and history of c
Harish Kumawat
 
Abstract Class & Abstract Method in Core Java
Abstract Class & Abstract Method in Core JavaAbstract Class & Abstract Method in Core Java
Abstract Class & Abstract Method in Core Java
MOHIT AGARWAL
 
Inheritance in c++
Inheritance in c++Inheritance in c++
Inheritance in c++
Vishal Patil
 
Threads (operating System)
Threads (operating System)Threads (operating System)
Threads (operating System)
Prakhar Maurya
 
Context free grammar
Context free grammar Context free grammar
Context free grammar
Mohammad Ilyas Malik
 
MACRO PROCESSOR
MACRO PROCESSORMACRO PROCESSOR
MACRO PROCESSOR
Bhavik Vashi
 

What's hot (20)

Object oriented programming c++
Object oriented programming c++Object oriented programming c++
Object oriented programming c++
 
Linker and Loader
Linker and Loader Linker and Loader
Linker and Loader
 
Unit 4 sp macro
Unit 4 sp macroUnit 4 sp macro
Unit 4 sp macro
 
G++ & GCC
G++ & GCCG++ & GCC
G++ & GCC
 
Functions in C
Functions in CFunctions in C
Functions in C
 
Introduction to method overloading &amp; method overriding in java hdm
Introduction to method overloading &amp; method overriding  in java  hdmIntroduction to method overloading &amp; method overriding  in java  hdm
Introduction to method overloading &amp; method overriding in java hdm
 
Command line arguments
Command line argumentsCommand line arguments
Command line arguments
 
Static typing vs dynamic typing languages
Static typing vs dynamic typing languagesStatic typing vs dynamic typing languages
Static typing vs dynamic typing languages
 
Python programming : Inheritance and polymorphism
Python programming : Inheritance and polymorphismPython programming : Inheritance and polymorphism
Python programming : Inheritance and polymorphism
 
structured programming
structured programmingstructured programming
structured programming
 
Introduction to c#
Introduction to c#Introduction to c#
Introduction to c#
 
Memory Management in OS
Memory Management in OSMemory Management in OS
Memory Management in OS
 
Normal forms cfg
Normal forms   cfgNormal forms   cfg
Normal forms cfg
 
Function in c program
Function in c programFunction in c program
Function in c program
 
1. over view and history of c
1. over view and history of c1. over view and history of c
1. over view and history of c
 
Abstract Class & Abstract Method in Core Java
Abstract Class & Abstract Method in Core JavaAbstract Class & Abstract Method in Core Java
Abstract Class & Abstract Method in Core Java
 
Inheritance in c++
Inheritance in c++Inheritance in c++
Inheritance in c++
 
Threads (operating System)
Threads (operating System)Threads (operating System)
Threads (operating System)
 
Context free grammar
Context free grammar Context free grammar
Context free grammar
 
MACRO PROCESSOR
MACRO PROCESSORMACRO PROCESSOR
MACRO PROCESSOR
 

Similar to GCC compiler

GCC
GCCGCC
Mender.io | Develop embedded applications faster | Comparing C and Golang
Mender.io | Develop embedded applications faster | Comparing C and GolangMender.io | Develop embedded applications faster | Comparing C and Golang
Mender.io | Develop embedded applications faster | Comparing C and Golang
Mender.io
 
Comparing C and Go
Comparing C and GoComparing C and Go
Comparing C and Go
Marcin Pasinski
 
Embedded Systems: Lecture 13: Introduction to GNU Toolchain (Build Tools)
Embedded Systems: Lecture 13: Introduction to GNU Toolchain (Build Tools)Embedded Systems: Lecture 13: Introduction to GNU Toolchain (Build Tools)
Embedded Systems: Lecture 13: Introduction to GNU Toolchain (Build Tools)
Ahmed El-Arabawy
 
Autotools pratical training
Autotools pratical trainingAutotools pratical training
Autotools pratical training
Thierry Gayet
 
Programming in Linux Environment
Programming in Linux EnvironmentProgramming in Linux Environment
Programming in Linux Environment
Dongho Kang
 
Unit i
Unit iUnit i
Unit i
vijay gupta
 
Introduction to the LLVM Compiler System
Introduction to the LLVM  Compiler SystemIntroduction to the LLVM  Compiler System
Introduction to the LLVM Compiler System
zionsaint
 
Introduction-to-C-Part-1 (1).doc
Introduction-to-C-Part-1 (1).docIntroduction-to-C-Part-1 (1).doc
Introduction-to-C-Part-1 (1).doc
MayurWagh46
 
DEVNET-2006 Coding 210: Parsing JSON in C++
DEVNET-2006	Coding 210: Parsing JSON in C++DEVNET-2006	Coding 210: Parsing JSON in C++
DEVNET-2006 Coding 210: Parsing JSON in C++
Cisco DevNet
 
Basics of C Lecture 2[16097].pptx
Basics of C Lecture 2[16097].pptxBasics of C Lecture 2[16097].pptx
Basics of C Lecture 2[16097].pptx
CoolGamer16
 
C++Basics2022.pptx
C++Basics2022.pptxC++Basics2022.pptx
C++Basics2022.pptx
Danielle780357
 
Gnu debugger
Gnu debuggerGnu debugger
Gnu debugger
Gizem Çetin
 
GNU Debugger
GNU DebuggerGNU Debugger
GNU Debugger
Gizem Çetin
 
Introduction-to-C-Part-1.pptx
Introduction-to-C-Part-1.pptxIntroduction-to-C-Part-1.pptx
Introduction-to-C-Part-1.pptx
NEHARAJPUT239591
 
Introduction-to-C-Part-1 JSAHSHAHSJAHSJAHSJHASJ
Introduction-to-C-Part-1 JSAHSHAHSJAHSJAHSJHASJIntroduction-to-C-Part-1 JSAHSHAHSJAHSJAHSJHASJ
Introduction-to-C-Part-1 JSAHSHAHSJAHSJAHSJHASJ
meharikiros2
 
C som-programmeringssprog-bt
C som-programmeringssprog-btC som-programmeringssprog-bt
C som-programmeringssprog-bt
InfinIT - Innovationsnetværket for it
 
Linux programming
Linux programmingLinux programming
Linux programming
Abhinav Upadhyay
 
cgo and Go plugins
cgo and Go pluginscgo and Go plugins
cgo and Go plugins
strikr .
 
basics of c++
basics of c++basics of c++
basics of c++
gourav kottawar
 

Similar to GCC compiler (20)

GCC
GCCGCC
GCC
 
Mender.io | Develop embedded applications faster | Comparing C and Golang
Mender.io | Develop embedded applications faster | Comparing C and GolangMender.io | Develop embedded applications faster | Comparing C and Golang
Mender.io | Develop embedded applications faster | Comparing C and Golang
 
Comparing C and Go
Comparing C and GoComparing C and Go
Comparing C and Go
 
Embedded Systems: Lecture 13: Introduction to GNU Toolchain (Build Tools)
Embedded Systems: Lecture 13: Introduction to GNU Toolchain (Build Tools)Embedded Systems: Lecture 13: Introduction to GNU Toolchain (Build Tools)
Embedded Systems: Lecture 13: Introduction to GNU Toolchain (Build Tools)
 
Autotools pratical training
Autotools pratical trainingAutotools pratical training
Autotools pratical training
 
Programming in Linux Environment
Programming in Linux EnvironmentProgramming in Linux Environment
Programming in Linux Environment
 
Unit i
Unit iUnit i
Unit i
 
Introduction to the LLVM Compiler System
Introduction to the LLVM  Compiler SystemIntroduction to the LLVM  Compiler System
Introduction to the LLVM Compiler System
 
Introduction-to-C-Part-1 (1).doc
Introduction-to-C-Part-1 (1).docIntroduction-to-C-Part-1 (1).doc
Introduction-to-C-Part-1 (1).doc
 
DEVNET-2006 Coding 210: Parsing JSON in C++
DEVNET-2006	Coding 210: Parsing JSON in C++DEVNET-2006	Coding 210: Parsing JSON in C++
DEVNET-2006 Coding 210: Parsing JSON in C++
 
Basics of C Lecture 2[16097].pptx
Basics of C Lecture 2[16097].pptxBasics of C Lecture 2[16097].pptx
Basics of C Lecture 2[16097].pptx
 
C++Basics2022.pptx
C++Basics2022.pptxC++Basics2022.pptx
C++Basics2022.pptx
 
Gnu debugger
Gnu debuggerGnu debugger
Gnu debugger
 
GNU Debugger
GNU DebuggerGNU Debugger
GNU Debugger
 
Introduction-to-C-Part-1.pptx
Introduction-to-C-Part-1.pptxIntroduction-to-C-Part-1.pptx
Introduction-to-C-Part-1.pptx
 
Introduction-to-C-Part-1 JSAHSHAHSJAHSJAHSJHASJ
Introduction-to-C-Part-1 JSAHSHAHSJAHSJAHSJHASJIntroduction-to-C-Part-1 JSAHSHAHSJAHSJAHSJHASJ
Introduction-to-C-Part-1 JSAHSHAHSJAHSJAHSJHASJ
 
C som-programmeringssprog-bt
C som-programmeringssprog-btC som-programmeringssprog-bt
C som-programmeringssprog-bt
 
Linux programming
Linux programmingLinux programming
Linux programming
 
cgo and Go plugins
cgo and Go pluginscgo and Go plugins
cgo and Go plugins
 
basics of c++
basics of c++basics of c++
basics of c++
 

More from Anil Pokhrel

System software
System softwareSystem software
System software
Anil Pokhrel
 
Internet and intranet
Internet and intranetInternet and intranet
Internet and intranet
Anil Pokhrel
 
Measure of dispersion
Measure of dispersionMeasure of dispersion
Measure of dispersion
Anil Pokhrel
 
Correlation and regression
Correlation and regressionCorrelation and regression
Correlation and regression
Anil Pokhrel
 
Correlation analysis
Correlation analysis Correlation analysis
Correlation analysis
Anil Pokhrel
 
Function in C Programming
Function in C ProgrammingFunction in C Programming
Function in C Programming
Anil Pokhrel
 
2 dimension array in programms
2 dimension array in programms2 dimension array in programms
2 dimension array in programms
Anil Pokhrel
 
Priority scheuling
Priority scheuling Priority scheuling
Priority scheuling
Anil Pokhrel
 
Operating system file system
Operating system file systemOperating system file system
Operating system file system
Anil Pokhrel
 
object oriented programming OOP
object oriented programming OOPobject oriented programming OOP
object oriented programming OOP
Anil Pokhrel
 
Numerical method runge kutta method
Numerical method runge kutta methodNumerical method runge kutta method
Numerical method runge kutta method
Anil Pokhrel
 
Management profile ppt
Management profile pptManagement profile ppt
Management profile ppt
Anil Pokhrel
 
Impact of error
Impact of errorImpact of error
Impact of error
Anil Pokhrel
 
Control statement
Control statementControl statement
Control statement
Anil Pokhrel
 
Bus and memory transfer
Bus and memory transferBus and memory transfer
Bus and memory transfer
Anil Pokhrel
 
Computer architecture data representation
Computer architecture  data representationComputer architecture  data representation
Computer architecture data representation
Anil Pokhrel
 
Management and leadership skills
Management and leadership skillsManagement and leadership skills
Management and leadership skills
Anil Pokhrel
 
color detection using open cv
color detection using open cvcolor detection using open cv
color detection using open cv
Anil Pokhrel
 
Client-server technology in web design
Client-server technology in web designClient-server technology in web design
Client-server technology in web design
Anil Pokhrel
 
Software Engineering requirements
Software Engineering requirementsSoftware Engineering requirements
Software Engineering requirements
Anil Pokhrel
 

More from Anil Pokhrel (20)

System software
System softwareSystem software
System software
 
Internet and intranet
Internet and intranetInternet and intranet
Internet and intranet
 
Measure of dispersion
Measure of dispersionMeasure of dispersion
Measure of dispersion
 
Correlation and regression
Correlation and regressionCorrelation and regression
Correlation and regression
 
Correlation analysis
Correlation analysis Correlation analysis
Correlation analysis
 
Function in C Programming
Function in C ProgrammingFunction in C Programming
Function in C Programming
 
2 dimension array in programms
2 dimension array in programms2 dimension array in programms
2 dimension array in programms
 
Priority scheuling
Priority scheuling Priority scheuling
Priority scheuling
 
Operating system file system
Operating system file systemOperating system file system
Operating system file system
 
object oriented programming OOP
object oriented programming OOPobject oriented programming OOP
object oriented programming OOP
 
Numerical method runge kutta method
Numerical method runge kutta methodNumerical method runge kutta method
Numerical method runge kutta method
 
Management profile ppt
Management profile pptManagement profile ppt
Management profile ppt
 
Impact of error
Impact of errorImpact of error
Impact of error
 
Control statement
Control statementControl statement
Control statement
 
Bus and memory transfer
Bus and memory transferBus and memory transfer
Bus and memory transfer
 
Computer architecture data representation
Computer architecture  data representationComputer architecture  data representation
Computer architecture data representation
 
Management and leadership skills
Management and leadership skillsManagement and leadership skills
Management and leadership skills
 
color detection using open cv
color detection using open cvcolor detection using open cv
color detection using open cv
 
Client-server technology in web design
Client-server technology in web designClient-server technology in web design
Client-server technology in web design
 
Software Engineering requirements
Software Engineering requirementsSoftware Engineering requirements
Software Engineering requirements
 

Recently uploaded

一比一原版布兰登大学毕业证(BU毕业证书)如何办理
一比一原版布兰登大学毕业证(BU毕业证书)如何办理一比一原版布兰登大学毕业证(BU毕业证书)如何办理
一比一原版布兰登大学毕业证(BU毕业证书)如何办理
wkip62b
 
Divertidamente SLIDE.pptxufururururuhrurid8dj
Divertidamente SLIDE.pptxufururururuhrurid8djDivertidamente SLIDE.pptxufururururuhrurid8dj
Divertidamente SLIDE.pptxufururururuhrurid8dj
lunaemel03
 
Graphic Design Tools and Software .pptx
Graphic Design Tools and Software   .pptxGraphic Design Tools and Software   .pptx
Graphic Design Tools and Software .pptx
Virtual Real Design
 
一比一原版(LaTrobe毕业证书)拉筹伯大学毕业证如何办理
一比一原版(LaTrobe毕业证书)拉筹伯大学毕业证如何办理一比一原版(LaTrobe毕业证书)拉筹伯大学毕业证如何办理
一比一原版(LaTrobe毕业证书)拉筹伯大学毕业证如何办理
67n7f53
 
哪里办理美国中央华盛顿大学毕业证双学位证书原版一模一样
哪里办理美国中央华盛顿大学毕业证双学位证书原版一模一样哪里办理美国中央华盛顿大学毕业证双学位证书原版一模一样
哪里办理美国中央华盛顿大学毕业证双学位证书原版一模一样
qo1as76n
 
Heuristics Evaluation - How to Guide.pdf
Heuristics Evaluation - How to Guide.pdfHeuristics Evaluation - How to Guide.pdf
Heuristics Evaluation - How to Guide.pdf
Jaime Brown
 
定制美国西雅图城市大学毕业证学历证书原版一模一样
定制美国西雅图城市大学毕业证学历证书原版一模一样定制美国西雅图城市大学毕业证学历证书原版一模一样
定制美国西雅图城市大学毕业证学历证书原版一模一样
qo1as76n
 
modular-kitchen home plan civil engineering.pdf
modular-kitchen home plan civil engineering.pdfmodular-kitchen home plan civil engineering.pdf
modular-kitchen home plan civil engineering.pdf
RashmitaSwain3
 
AHMED TALAAT ARCHITECTURE PORTFOLIO .pdf
AHMED TALAAT ARCHITECTURE PORTFOLIO .pdfAHMED TALAAT ARCHITECTURE PORTFOLIO .pdf
AHMED TALAAT ARCHITECTURE PORTFOLIO .pdf
talaatahm
 
一比一原版美国哥伦比亚大学毕业证Columbia成绩单一模一样
一比一原版美国哥伦比亚大学毕业证Columbia成绩单一模一样一比一原版美国哥伦比亚大学毕业证Columbia成绩单一模一样
一比一原版美国哥伦比亚大学毕业证Columbia成绩单一模一样
881evgn0
 
Introduction to User experience design for beginner
Introduction to User experience design for beginnerIntroduction to User experience design for beginner
Introduction to User experience design for beginner
ellemjani
 
UXpert_Report (UALR Mapping Renewal 2022).pdf
UXpert_Report (UALR Mapping Renewal 2022).pdfUXpert_Report (UALR Mapping Renewal 2022).pdf
UXpert_Report (UALR Mapping Renewal 2022).pdf
anthonylin333
 
ADESGN3S_Case-Study-Municipal-Health-Center.pdf
ADESGN3S_Case-Study-Municipal-Health-Center.pdfADESGN3S_Case-Study-Municipal-Health-Center.pdf
ADESGN3S_Case-Study-Municipal-Health-Center.pdf
GregMichaelTapawan
 
一比一原版(UoN毕业证书)纽卡斯尔大学毕业证如何办理
一比一原版(UoN毕业证书)纽卡斯尔大学毕业证如何办理一比一原版(UoN毕业证书)纽卡斯尔大学毕业证如何办理
一比一原版(UoN毕业证书)纽卡斯尔大学毕业证如何办理
f22b6g9c
 
一比一原版(CSU毕业证书)查尔斯特大学毕业证如何办理
一比一原版(CSU毕业证书)查尔斯特大学毕业证如何办理一比一原版(CSU毕业证书)查尔斯特大学毕业证如何办理
一比一原版(CSU毕业证书)查尔斯特大学毕业证如何办理
67n7f53
 
Practical eLearning Makeovers for Everyone
Practical eLearning Makeovers for EveryonePractical eLearning Makeovers for Everyone
Practical eLearning Makeovers for Everyone
Bianca Woods
 
LGBTQIA Pride Month presentation Template
LGBTQIA Pride Month presentation TemplateLGBTQIA Pride Month presentation Template
LGBTQIA Pride Month presentation Template
DakshGudwani
 
一比一原版(Vancouver毕业证书)温哥华岛大学毕业证如何办理
一比一原版(Vancouver毕业证书)温哥华岛大学毕业证如何办理一比一原版(Vancouver毕业证书)温哥华岛大学毕业证如何办理
一比一原版(Vancouver毕业证书)温哥华岛大学毕业证如何办理
ijk38lw
 
一比一原版阿肯色大学毕业证(UCSF毕业证书)如何办理
一比一原版阿肯色大学毕业证(UCSF毕业证书)如何办理一比一原版阿肯色大学毕业证(UCSF毕业证书)如何办理
一比一原版阿肯色大学毕业证(UCSF毕业证书)如何办理
bo44ban1
 
原版制作(MDIS毕业证书)新加坡管理发展学院毕业证学位证一模一样
原版制作(MDIS毕业证书)新加坡管理发展学院毕业证学位证一模一样原版制作(MDIS毕业证书)新加坡管理发展学院毕业证学位证一模一样
原版制作(MDIS毕业证书)新加坡管理发展学院毕业证学位证一模一样
hw2xf1m
 

Recently uploaded (20)

一比一原版布兰登大学毕业证(BU毕业证书)如何办理
一比一原版布兰登大学毕业证(BU毕业证书)如何办理一比一原版布兰登大学毕业证(BU毕业证书)如何办理
一比一原版布兰登大学毕业证(BU毕业证书)如何办理
 
Divertidamente SLIDE.pptxufururururuhrurid8dj
Divertidamente SLIDE.pptxufururururuhrurid8djDivertidamente SLIDE.pptxufururururuhrurid8dj
Divertidamente SLIDE.pptxufururururuhrurid8dj
 
Graphic Design Tools and Software .pptx
Graphic Design Tools and Software   .pptxGraphic Design Tools and Software   .pptx
Graphic Design Tools and Software .pptx
 
一比一原版(LaTrobe毕业证书)拉筹伯大学毕业证如何办理
一比一原版(LaTrobe毕业证书)拉筹伯大学毕业证如何办理一比一原版(LaTrobe毕业证书)拉筹伯大学毕业证如何办理
一比一原版(LaTrobe毕业证书)拉筹伯大学毕业证如何办理
 
哪里办理美国中央华盛顿大学毕业证双学位证书原版一模一样
哪里办理美国中央华盛顿大学毕业证双学位证书原版一模一样哪里办理美国中央华盛顿大学毕业证双学位证书原版一模一样
哪里办理美国中央华盛顿大学毕业证双学位证书原版一模一样
 
Heuristics Evaluation - How to Guide.pdf
Heuristics Evaluation - How to Guide.pdfHeuristics Evaluation - How to Guide.pdf
Heuristics Evaluation - How to Guide.pdf
 
定制美国西雅图城市大学毕业证学历证书原版一模一样
定制美国西雅图城市大学毕业证学历证书原版一模一样定制美国西雅图城市大学毕业证学历证书原版一模一样
定制美国西雅图城市大学毕业证学历证书原版一模一样
 
modular-kitchen home plan civil engineering.pdf
modular-kitchen home plan civil engineering.pdfmodular-kitchen home plan civil engineering.pdf
modular-kitchen home plan civil engineering.pdf
 
AHMED TALAAT ARCHITECTURE PORTFOLIO .pdf
AHMED TALAAT ARCHITECTURE PORTFOLIO .pdfAHMED TALAAT ARCHITECTURE PORTFOLIO .pdf
AHMED TALAAT ARCHITECTURE PORTFOLIO .pdf
 
一比一原版美国哥伦比亚大学毕业证Columbia成绩单一模一样
一比一原版美国哥伦比亚大学毕业证Columbia成绩单一模一样一比一原版美国哥伦比亚大学毕业证Columbia成绩单一模一样
一比一原版美国哥伦比亚大学毕业证Columbia成绩单一模一样
 
Introduction to User experience design for beginner
Introduction to User experience design for beginnerIntroduction to User experience design for beginner
Introduction to User experience design for beginner
 
UXpert_Report (UALR Mapping Renewal 2022).pdf
UXpert_Report (UALR Mapping Renewal 2022).pdfUXpert_Report (UALR Mapping Renewal 2022).pdf
UXpert_Report (UALR Mapping Renewal 2022).pdf
 
ADESGN3S_Case-Study-Municipal-Health-Center.pdf
ADESGN3S_Case-Study-Municipal-Health-Center.pdfADESGN3S_Case-Study-Municipal-Health-Center.pdf
ADESGN3S_Case-Study-Municipal-Health-Center.pdf
 
一比一原版(UoN毕业证书)纽卡斯尔大学毕业证如何办理
一比一原版(UoN毕业证书)纽卡斯尔大学毕业证如何办理一比一原版(UoN毕业证书)纽卡斯尔大学毕业证如何办理
一比一原版(UoN毕业证书)纽卡斯尔大学毕业证如何办理
 
一比一原版(CSU毕业证书)查尔斯特大学毕业证如何办理
一比一原版(CSU毕业证书)查尔斯特大学毕业证如何办理一比一原版(CSU毕业证书)查尔斯特大学毕业证如何办理
一比一原版(CSU毕业证书)查尔斯特大学毕业证如何办理
 
Practical eLearning Makeovers for Everyone
Practical eLearning Makeovers for EveryonePractical eLearning Makeovers for Everyone
Practical eLearning Makeovers for Everyone
 
LGBTQIA Pride Month presentation Template
LGBTQIA Pride Month presentation TemplateLGBTQIA Pride Month presentation Template
LGBTQIA Pride Month presentation Template
 
一比一原版(Vancouver毕业证书)温哥华岛大学毕业证如何办理
一比一原版(Vancouver毕业证书)温哥华岛大学毕业证如何办理一比一原版(Vancouver毕业证书)温哥华岛大学毕业证如何办理
一比一原版(Vancouver毕业证书)温哥华岛大学毕业证如何办理
 
一比一原版阿肯色大学毕业证(UCSF毕业证书)如何办理
一比一原版阿肯色大学毕业证(UCSF毕业证书)如何办理一比一原版阿肯色大学毕业证(UCSF毕业证书)如何办理
一比一原版阿肯色大学毕业证(UCSF毕业证书)如何办理
 
原版制作(MDIS毕业证书)新加坡管理发展学院毕业证学位证一模一样
原版制作(MDIS毕业证书)新加坡管理发展学院毕业证学位证一模一样原版制作(MDIS毕业证书)新加坡管理发展学院毕业证学位证一模一样
原版制作(MDIS毕业证书)新加坡管理发展学院毕业证学位证一模一样
 

GCC compiler

  • 1. 1 GCC Compiler Presented by: Anil pokhrel BscCSIT 6th semester
  • 2. 2 Contents • History of GCC • Introduction to GCC • Options in GCC • Conclusion
  • 3. History of GCC • 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.
  • 4. 4 Introduction to 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 with also Java and a couple other languages
  • 5.
  • 6. To compile: -c 1. gcc performs compilation and assembly of the source file without linking. 2. The output are usually object code files, .o; they can later be linked and form the desired executables. 3. Generates one object file per source file keeping the same prefix (before .) of the filename. 4. gcc main.c
  • 7. Options: -o <filename> • Places resulting file into the filename specified instead of 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 specified • a.out if executable • These can be overridden with the -o option. • gcc main.c -o main
  • 8. Options: -g •Includes debugging info in the generated object code. This info can later be used in gdb. •gcc allows to use -g with the optimization turned on (-O) in case there is a need to debug or trace the optimized code.
  • 9. Options: -Wall • Shows most of the warnings related to possibly incorrect code. • Wall is a combination of a large common set of the -W options together. These typically include: • unused variables • possibly uninitialized variables when in use for the first time • defaulting return types • missing braces and parentheses in certain context that make it ambiguous • etc.
  • 10. Options: -ansi • For those who are picky about standard compliance and to ensures the code compiled complies with the ANSI C standard; • These options can be quite annoying for those who don’t know C well since gcc will refuse to compile unkosher C code, which otherwise it has no problems with. • $ gcc -Wall -ansi main.c -o main
  • 12. Refferences • https://www.geeksforgeeks.org/gcc-command-in-linux- with-examples/ • https://www.rapidtables.com/code/linux/gcc.html • https://en.wikipedia.org/wiki/GNU_Compiler_Collection • https://www.thegeekstuff.com/2012/10/gcc-compiler- options/
  • 13. 13