User Tools

Site Tools


haas:fall2018:cprog:projects:sof0

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
haas:fall2018:cprog:projects:sof0 [2017/08/20 17:10] – external edit 127.0.0.1haas:fall2018:cprog:projects:sof0 [2018/08/27 18:56] (current) – [Review of Compiling/Executing] wedge
Line 3: Line 3:
 <WRAP><fs 150%>CSCS1320 C/C++ Programming</fs></WRAP> <WRAP><fs 150%>CSCS1320 C/C++ Programming</fs></WRAP>
 </WRAP> </WRAP>
- 
-~~TOC~~ 
  
 ======Project: MENTAL MATH - SQUARES OF FIVES (sof0)====== ======Project: MENTAL MATH - SQUARES OF FIVES (sof0)======
Line 221: Line 219:
  
 <cli> <cli>
-lab46:~/src/cprog/proj$ gcc -Wall --std=c99 -o hello hello.c+lab46:~/src/cprog/proj$ gcc -Wall --std=gnu99 -o hello hello.c
 lab46:~/src/cprog/proj$  lab46:~/src/cprog/proj$ 
 </cli> </cli>
Line 230: Line 228:
  
 <code> <code>
-gcc -Wall --std=c99 -o BINARY_FILE SOURCE_FILE+gcc -Wall --std=gnu99 -o BINARY_FILE SOURCE_FILE
 </code> </code>
  
 The BINARY_FILE comes **immediately after** the **-o**, **NOT** the SOURCE_FILE (it must never **immediately** follow a **-o**). It can precede, and such is perfectly valid (especially if you feel that way more intuitive). The BINARY_FILE comes **immediately after** the **-o**, **NOT** the SOURCE_FILE (it must never **immediately** follow a **-o**). It can precede, and such is perfectly valid (especially if you feel that way more intuitive).
  
-The **-Wall** (treat all warnings as errors, increase general verbosity about warnings) and **--std=c99** (switch compiler to use the **C99** standard of the C language) are options given to the compiler.+The **-Wall** (treat all warnings as errors, increase general verbosity about warnings) and **--std=gnu99** (switch compiler to use the **C99** standard of the C language, with GNU extensions) are options given to the compiler.
  
 To execute your binary, we need to specify a path to it, so we use **./**, which basically references the current directory: To execute your binary, we need to specify a path to it, so we use **./**, which basically references the current directory:
haas/fall2018/cprog/projects/sof0.1503249046.txt.gz · Last modified: 2017/08/20 17:10 by 127.0.0.1