-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.gitignore
52 lines (30 loc) · 1.56 KB
/
.gitignore
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
compiled atm.exe by using
g++ main.cpp ./implementation/atm.cpp -o atm
to compile the code into an executable:
compile using the g++ compiler
you can use flags to create a target executable
Default Compilation
g++ <filename> compiles a file named "filename" into an executable named "a.out"
Renaming the Output
g++ -o <execname> <filename> compiles a file named "filename" into an executable named "execname"
whatever immediately follows the "-o" becomes the executable name
Creating Object Code
Object code is source code that has been compiled down to machine language (binary) but has not yet been linked with all the libraries and other files.
g++ -c <filename> compiles a file named "filename" into object code named "filename.o"
Linking Object Code
Once object code has been created, an executable can be created by linking the object code with other precompiled pieces of code (other ".o" files)
All the standard libraries have object code compiled for them
g++ -o <execname> filename.o links the object code "filename.o" with any of its libraries and creates an executable named "execname"
Linking External Libraries
Occasionally a library will be needed that is not linked by default
Use the "-l" option to link in the extra library object code
g++ -o <execname> <filename> -lxnet compiles a executable named "execname", from a file named "filename", using the library that contains the object code for sockets (sys/socket.h)
UPLOADING to github
open git bash in file location
to view status:
git status
to save changes to git:
git add -A
git commit
git push
DONE