Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
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