Showing posts with label clang. Show all posts
Showing posts with label clang. Show all posts

Thursday, March 11, 2021

compiling

 compiling is the process of converting source code to machine code

but it actually consists of the following steps:

pre-processing

compiling

assembling

linking

(when we say compile, we are actually referring to these four steps, but we wont dwell on such low-level details)


pre-processing - looks for "#" , and then finds-and-replaces, copy-and-pastes



cs50 week 2 video 12:40

source: cs50



-lcs50 ---- argument for linking binaries

 clang -o hello hello.c -lcs50



this argument tells the compiler to link the cs50 library binaries


-lm   ....... links a math library

-lcrypt   ......... links to a cryptography or encryption library



make automates the work of manually typing in a whole bunch of command line argument when compiling



cs50 week 2 video 9:30 , 10:42


source: cs50



Tuesday, March 9, 2021