Is there any difference between #include <> and #include "" in terms of linking?

Is there any difference between installing a package and using #include <lib.h> and manually downloading the source of the code you want and using #include "lib.h" other than the location to be searched? assuming both have the same versions
Does the installing a package way install a shared library or is the code statically linked into the program as well?
closed account (EzwRko23)
Linking and header files are unrelated things.
The only difference between <> and "" is searched location.
Linker does not know anything about the header/source files that were used to create the binary module being linked.
Last edited on
Indeed, header files are (AFAIK) not compiled at compile-time, so they can't be linked as there are no object files derived from them to link.

#include is basically just a copy-and-paste procedure EDIT: performed by the preprocessor at compile-time.

-Albatross
Last edited on
"#include" is for the compiler not the linker
Typically you use the <> for things like system header files or STL files because they are not part of your project. You use the "" for your project files. It changes the way the compiler searches for the actual files. The system headers are not going to be within your project folders so it doesn't make sense to include them with the "" notation.
Topic archived. No new replies allowed.