Thread: Makefiles
View Single Post
Old 21st October 2008
BSDfan666 BSDfan666 is offline
Real Name: N/A, this is the interweb.
Banned
 
Join Date: Apr 2008
Location: Ontario, Canada
Posts: 2,223
Default

You weren't listening, it is necessary.. the compiler only links with libc, this is terminology you'll need to understand.

Let's take the prototype for printf for instance.. it's in stdio.h.

Code:
int printf(const char *format, ...);
From this, we know the printf() function exists in libc.. we know the arguments the function takes.. and now, so does the compiler.

This was a simple example, what you might want to do is read over the header files you're including.. it's most definitely beneficial to see what information they define.

I'm not going to explain '...' (variable arguments), but you'll learn all this eventually yourself.
Reply With Quote