[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: C source



Hi,

i second tomás' assessment and proposal.


Reco wrote:
> #include with encased in 'less' and 'more' characters instructs
> preprocessor to search header files system-wide. A search path can be
> modified with -L flag.

It is not a system-wide search, but rather a search iterating over a list
of directory prefixes:
  https://gcc.gnu.org/onlinedocs/cpp/Include-Syntax.html

That's why i agree with tomás that e.g.
  /usr/include/openssl/md5.h
should be used like

  #include <openssl/md5.h>

because i expect that /usr/include is in the prefix list.

gcc -L is for libraries (-l):
  https://gcc.gnu.org/onlinedocs/gcc-4.9.3/gcc/Directory-Options.html#Directory-Options
Own include directories are added by -I for 
  #include <...>
or -iquote for
  $include "..."


> #include with quotes instructs preprocessor to search a header file in
> the current directory.

But if not found there, the prefix list is searched, too.


Have a nice day :)

Thomas


Reply to: