SPNU151W January 1998 – March 2023 66AK2E05 , 66AK2H06 , 66AK2H12 , 66AK2H14 , AM1705 , AM1707 , AM1802 , AM1806 , AM1808 , AM1810 , AM5K2E04 , C346BA02 , C348A01 , CS241C01-Q1 , CS241C05-Q1 , CS246C01-Q1 , CS348C02-Q1 , OMAP-L132 , OMAP-L137 , OMAP-L138 , S470AV336LYSQRB , TMS470R1A288 , TMS470R1A384 , TMS470R1A64 , TMS470R1B1M , TMS470R1B512 , TMS470R1B768
The --include_path option names an alternate
directory that contains #include files. The --include_path option's short form is
-I
. The format of the --include_path option is:
--include_path=directory1 [--include_path= directory2 ...]
There is no limit to the number of --include_path options per invocation of the compiler; each --include_path option names one directory. In C source, you can use the #include directive without specifying any directory information for the file; instead, you can specify the directory information with the --include_path option.
For example, assume that a file called source.c is in the current directory. The file source.c contains the following directive statement:
#include "alt.h"
Assume that the complete pathname for alt.h is:
UNIX | /tools/files/alt.h |
Windows | c:\tools\files\alt.h |
The table below shows how to invoke the compiler. Select the command for your operating system:
Operating System | Enter |
---|---|
UNIX |
|
Windows |
|
Specifying Path Information in Angle Brackets: If you specify the path information in angle brackets, the compiler applies that information relative to the path information specified with --include_path options and the TI_ARM_C_DIR environment variable.
For example, if you set up TI_ARM_C_DIR with the following command:
TI_ARM_C_DIR "/usr/include;/usr/ucb"; export TI_ARM_C_DIR
or invoke the compiler with the following command:
armcl --include_path=/usr/include file.c
and file.c contains this line:
#include <sys/proc.h>
the result is that the included file is in the following path:
/usr/include/sys/proc.h