[cfe-dev] Compatibility with MSVC #include "FILE" search order

Abramo Bagnara abramo.bagnara at bugseng.com
Fri Nov 9 01:27:37 PST 2012


In http://msdn.microsoft.com/en-us/library/36k2cdd4%28v=vs.100%29.aspx
it is written:

> Quoted form
> 
> The preprocessor searches for include files in the following order:
> 
> 1. In the same directory as the file that contains the #include
> statement.
> 
> 2. In the directories of any previously opened include files in the
> reverse order in which they were opened. The search starts from the
> directory of the include file that was opened last and continue
> through the directory of the include file that was opened first.
> 
> 3. Along the path specified by each /I compiler option.
> 
> 4. Along the paths specified by the INCLUDE environment variable.

In clang do we have an option to emulate the point 2?

-- 
Abramo Bagnara

BUGSENG srl - http://bugseng.com
mailto:abramo.bagnara at bugseng.com



More information about the cfe-dev mailing list