Atmel CAVR-4 ユーザーズマニュアル
CAVR-4
Part 2. Compiler reference
Compiler options
183
--header_context
--header_context
Occasionally, to find the cause of a problem it is necessary to know which header file
was included from which source line. Use this option to list, for each diagnostic
message, not only the source position of the problem, but also the entire include stack at
that point.
was included from which source line. Use this option to list, for each diagnostic
message, not only the source position of the problem, but also the entire include stack at
that point.
-I
-Ipath
-I path
Use this option to specify the search path for
#include
files. This option may be used
more than once on a single command line.
Following is the full description of the compiler’s
#include
file search procedure:
●
If the name of the
#include
file is an absolute path, that file is opened.
●
If the compiler encounters the name of an
#include
file in angle brackets, such as:
#include <stdio.h>
it searches the following directories for the file to include:
1 The directories specified with the
-I
option, in the order that they were
specified.
2 The directories specified using the
C_INCLUDE
environment variable, if any.
●
If the compiler encounters the name of an
#include
file in double quotes, for
example:
#include "vars.h"
it searches the directory of the source file in which the
#include
statement occurs,
and then performs the same sequence as for angle-bracketed filenames.
If there are nested
#include
files, the compiler starts searching the directory of the
file that was last included, iterating upwards for each included file, searching the
source file directory last. For example:
source file directory last. For example:
src.c in directory dir\src
#include "src.h"
...
src.h in directory dir\include
#include "config.h"
...
When
dir\exe
is the current directory, use the following command for compilation:
iccavr ..\src\src.c -I..\include -I..\debugconfig