This may seem a little stupid:) But it\'s been bothering a while. When I include some header files which are written by others in my C++/C program, how does the compiler kno
In general, the implementation is distributed as form of pre-compiled libraries. You need to tell the compiler where they are located.
For example, for gcc, quoting the online manual
-llibrary -l librarySearch the library named library when linking. [...]
and,
-LdirAdd directory dir to the list of directories to be searched for
-l.
Note: you don't need to explicitly specify the standard libraries, they are automatically linked. Rather, if you don't want them to be linked with you binary, you need to inform the compiler by passing the -nostdlib option.