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

Sep 15, 2010 at 9:55am
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?
Sep 15, 2010 at 10:06am
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 Sep 15, 2010 at 10:07am
Sep 15, 2010 at 3:22pm
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 Sep 16, 2010 at 2:52pm
Sep 16, 2010 at 2:34pm
"#include" is for the compiler not the linker
Sep 21, 2010 at 11:40pm
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.