Skip to content

Instantly share code, notes, and snippets.

@gerdr
Created March 26, 2012 09:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gerdr/2204236 to your computer and use it in GitHub Desktop.
Save gerdr/2204236 to your computer and use it in GitHub Desktop.
GCC header lookup order

Searched by #include "foo.h"

  • current directory
  • directories addded via -iquote

Searched by both #include "foo.h" and #include <foo.h>

  • directories added via -I

Searched by both #include "foo.h" and #include <foo.h> and considered system headers, ie warnings will be ignored

  • directories added via -isystem
  • standard system directories

The list is in lookup order.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment