Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
B
battle_c
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
이장원
battle_c
Commits
8a702993
Commit
8a702993
authored
4 years ago
by
이장원
Browse files
Options
Downloads
Patches
Plain Diff
컴파일러 vs 인터프리터, GCC 명령어 옵션
parent
95774cb0
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
8.6/README.md
+11
-11
11 additions, 11 deletions
8.6/README.md
with
11 additions
and
11 deletions
8.6/README.md
+
11
−
11
View file @
8a702993
# 컴파일러
VS
인터프리터
# 컴파일러
vs
인터프리터
컴파일러와 인터프리터는 고급언어로 작성된 원시 프로그램(Source Program)을 목적 프로그램(Object Program)으로 번역하는 번역 프로그램이며, 프로그램 번역 방식에 따라 구분된다.
컴파일러와 인터프리터는 고급언어로 작성된 원시 프로그램(Source Program)을 목적 프로그램(Object Program)으로 번역하는 번역 프로그램이며, 프로그램 번역 방식에 따라 구분된다.
...
@@ -30,26 +30,26 @@
...
@@ -30,26 +30,26 @@
# GCC 명령어 옵션
# GCC 명령어 옵션
*
-o
*
-o
지정한 파일명에 출력
지정한 파일명에 출력
한다
```
```
$ gcc -o 00.option-o 00.option-o.c
$ gcc -o 00.option-o 00.option-o.c
```
```
!
[
o
](
../Images/o.png
)
!
[
o
](
../Images/o.png
)
*
-E
*
-E
전처리하여 전처리된 소스 파일(.i)을 생성
전처리하여 전처리된 소스 파일(.i)을 생성
한다
```
```
$ gcc -E 01.option-E.c
$ gcc -E 01.option-E.c
```
```
stdout에 결과를 출력
-E 옵션만 사용하면 전처리된 결과를 stdout에 보여주기만 한다.
```
```
$ gcc -E 01.option-E.c > 01.option-E.i
$ gcc -E 01.option-E.c > 01.option-E.i
```
```
리디렉션
으로 .i 생성
redirection
으로 .i
를
생성
한다.
!
[
E
](
../Images/E.png
)
!
[
E
](
../Images/E.png
)
*
-S
*
-S
컴파일하여 어셈블리 파일(.s)을 생성
컴파일하여 어셈블리 파일(.s)을 생성
한다
```
```
$ gcc -S 02.option-S.i
$ gcc -S 02.option-S.i
```
```
...
@@ -57,7 +57,7 @@
...
@@ -57,7 +57,7 @@
!
[
S
](
../Images/S.png
)
!
[
S
](
../Images/S.png
)
*
-c
*
-c
어셈블하여 목적 파일(.o)을 생성
어셈블하여 목적 파일(.o)을 생성
한다
```
```
$ gcc -c 03.option-c.s
$ gcc -c 03.option-c.s
```
```
...
@@ -65,14 +65,14 @@
...
@@ -65,14 +65,14 @@
!
[
c
](
../Images/c.png
)
!
[
c
](
../Images/c.png
)
*
-D
*
-D
외부에서 매크로를 define
외부에서 매크로를 define
한다
```
```
$ gcc -DNO 05.option-D.c
$ gcc -DNO 05.option-D.c
```
```
!
[
D
](
../Images/D.png
)
!
[
D
](
../Images/D.png
)
*
-g
*
-g
운영체제 고유의 형식으로 디버깅 정보를 만
듦
운영체제 고유의 형식으로 디버깅 정보를 만
든다
```
```
$ gcc -g 06.option-g.c
$ gcc -g 06.option-g.c
```
```
...
@@ -82,14 +82,14 @@
...
@@ -82,14 +82,14 @@
on Git Bash
on Git Bash
*
-Wall
*
-Wall
GCC가 제공할 수 있고, 일반적으로 유용한 모든 경고 메시지 출력
GCC가 제공할 수 있고, 일반적으로 유용한 모든 경고 메시지 출력
한다
```
```
$ gcc -Wall 07.option-Wall.c
$ gcc -Wall 07.option-Wall.c
```
```
!
[
Wall
](
../Images/Wall.png
)
!
[
Wall
](
../Images/Wall.png
)
*
-I(upper case of i)
*
-I(upper case of i)
헤더 파일을 검색할 디렉터리를 추가
헤더 파일을 검색할 디렉터리를 추가
한다
```
```
$ gcc -ImyInclude 09.option-I.c
$ gcc -ImyInclude 09.option-I.c
```
```
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment