Specify Compiler Files
Specify Include Files
The
searches the default system areas for include files and items specified by the
Intel® oneAPI
DPC++/C++
CompilerI
compiler option. The compiler searches directories for include files in the following order:
- Directories specified by theIoption
- Directories specified in the environment variables
- Default include directories
Use the
X
(Windows*) or
option to remove the default directories from the include file search path.
-nostdinc
(Linux*)For example, to direct the compiler to search the path
/alt/include
instead of the default path, do the following:
For C/C++ projects:
// Linux icpx -X -I/alt/include prog1.cpp
// Windows icx /X /I\alt\include prog1.cpp
For DPC++ projects:
// Linux dpcpp -nostdinc -I/alt/include prog1.cpp
// Windows dpcpp-cl /X /I\alt\include prog1.cpp
Specify Assembly Files
You can use the
or
to specify an alternate name for an assembly file. The compiler generates an assembly file named
or
.
/Fa
option (Windows*)-S
and
-o
options (Linux*)
myasm.asm
(Windows)myasm.s
(Linux)For C/C++ projects:
// Linux icpx -S -omyasm.s x.cpp
// Windows icx /Famyasm x.cpp
For DPC++ projects:
// Linux dpcpp -S -omyasm.s x.cpp
// Windows dpcpp-cl /Famyasm x.cpp
Specify Object Files
You can use the
or
to specify an alternate name for an object file. In this example, the compiler generates an object file name
or
.
/Fo
option (Windows*)-c
and
-o
options (Linux*)myobj.obj
(Windows)myobj.o
(Linux)For C/C++ projects:
// Linux icpx -c -omyobj.o x.cpp
// Windows icx /Fomyobj x.cpp
For DPC++ projects:
// Linux dpcpp -c -omyobj.o x.cpp
// Windows dpcpp-cl /Fomyobj x.cpp