Difference between Header Search Path and Library Search Path?

This question is with context to iPhone -

What is the difference between Header Search Paths and Library Search Paths ?


Solution 1:

Header search path is where the compiler will look for header files (i.e. the ".h" files you include from your class implementations.

Library search path is where the linker will look for compiled object files (or archive files containing those compiled object files) that are referenced from within the code being compiled and linked.

Solution 2:

HEADER_SEARCH_PATHS vs LIBRARY_SEARCH_PATHS

  • Header Search Paths(HEADER_SEARCH_PATHS) - It is pre-compile time check that can throws Module not found. There are locations of the public headers(.h), simply tell Xcode where they are.

  • Library Search Path(LIBRARY_SEARCH_PATHS) - It is compile time check that can throws Library not found for. There are locations of the libraries(executables), simply tell Xcode where they are to use it for linking. Sensitive to whitespace