**** Advance Notice ****

This site will be closed on 31 December 2015,

Important Information for users of NXP LPCXpresso

This site is for users of Code Red branded products.

NXP LPCXpresso users should visit the LPCXpresso FAQ's for up-to-date information relevant to that product.

How include paths work

When you add a directory under the "Directories" section of the compiler, you are setting the compilers "-I" option.

"-I" adds a directory to the compiler seacrh path for include files. When the compiler tries to locate header files, it will search each directory in the search path for the *exact* filename provided in the #include directive.

For example, if your project contains the following directory structure (at the root of the project):

my_headers
  my_header.h
  sub_dir
     my_sub_header.h

You can add the following to the "Directories" compiler setting

In your source, you can:

    #include "my_header.h"
    #include "sub_dir/my_sub_header.h"

Alternatively, you can add the following to the "Directories" compiler setting

In your source, you can:

    #include "my_header.h"
    #include "my_sub_header.h"

In Red Suite, you can specify Include and Library paths as

IncludePaths (last edited 2008-11-26 11:31:22 by DerekMorris)