Compile a C++ program using icpc
¶
icpc is an Intel C++ compiler.
This page describes how to compile C++ code using icpc
.
Procedure¶
1. Load the modules¶
Load a recent intel
module:
2. Write the C++ program¶
Create and write a C++ source file called hello_world.cpp
:
In nano, write the C++ program as such:
3. Compile the C++ program¶
After saving and closing nano, compile as such:
4. Run the executable¶
Run the program:
Output: