Pretty much title sums it up.
I\'m not sure the difference between the two if i\'d like to use a library.
Thanks!
The compiler needs to know the include directories, since it needs to include header (interface) files of libraries you want to use.
The linker needs to know the library directories, since it needs to link your executable to the (precompiled) implementation of the library.
See also What are the differences between a compiler and a linker?