
Beginners' Guide to Linkers - rocky1138
http://www.lurklurk.org/linkers/linkers.html
======
bluetomcat
_Wherever the code refers to a variable or function, the compiler only allows
this if it has previously seen a declaration for that variable or function—the
declaration is a promise that a definition exists somewhere else in the whole
program._

The notable exception here is implicitly declared functions, but they were
dropped in C99 anyway.

~~~
rocky1138
Indeed. After reading the OP and finally getting a handle on how linkers,
assemblers, compilers, etc. work, I asked myself why functions weren't just
implicit. Turns out K&R thought the same, but the solution sucked because it
assumes an int return, which may not be what the function actually returns.

------
AlexanderDhoore
The `static` keyword in C is too confusing. It's hard to explain to beginners.
Especially if these beginners come from Java, where it has even more meanings.
I don't understand why we have to use the same keyword over and over again.

~~~
userbinator
In C it only has two meanings, both of which make sense if you think of them
this way:

1\. " _sta_ tic globals _sta_ y in the same file they are defined in."

2\. " _sta_ tic locals _sta_ y allocated even when the function they're
defined in is not being executed."

------
NH_2
Helpful for readability:

var style = document.getElementsByTagName('body')[0].style; style.width =
'800px'; style.margin = '0 auto'; style['font-size'] = '19px';

~~~
joebo
Alternatively, just resize your browser window/tab.

------
angersock
Understanding the linking process is a big part of understanding a lot of the
problems you'll run into with C--it's great seeing somebody going over this
information!

------
zGrav
Thank you, was actually needing a refresh on this!

------
linker3000
Did someone call!?

