Eclipse* は、作成した実行可能、共用ライブラリー、または static ライブラリー・プロジェクトのインテル® oneAPI DPC++/C++ コンパイラー・オプションを含む makefile をビルドすることができます。プロジェクトの作成後、makefile とプロジェクト・ソースファイルを他のディレクトリーにエクスポートして、コマンドラインから make を使用してプロジェクトをビルドすることができます。
makefile をエクスポートする方法を次に示します。
ターミナルウィンドウでディレクトリーを /cpp/hello_world/Release ディレクトリーに変更して、次のコマンドで make を実行します: make clean all。
次のような出力結果が表示されます。
C++:
rm -rf ./new_source_file.o ./new_source_file.d hello_world Building file: ../new_source_file.c Invoking: Intel C++ Compiler icx -O2 -MMD -MP -MF"new_source_file.d" -MT"new_source_file.d" -c -o "new_source_file.o" "../new_source_file.c" Finished building: ../new_source_file.c Building target: hello_world Invoking: Intel C++ compiler icx -o "hello_world" ./new_source_file.o Finished building target: hello_world
DPC++:
rm -rf ./new_source_file.o ./new_source_file.d hello_world Building file: ../new_source_file.c Invoking: Intel® oneAPI DPC++ Compiler dpcpp -O2 -MMD -MP -MF"new_source_file.d" -MT"new_source_file.d" -c -o "new_source_file.o" "../new_source_file.c" Finished building: ../new_source_file.c Building target: hello_world Invoking: Linker dpcpp -o "hello_world" ./new_source_file.o Finished building target: hello_world
同じディレクトリーに hello_world 実行ファイルが作成されます。