A simple Hello World application can demonstrate some of the debugger's basic features.
Create a new file named helloworld.c in a working directory. Add the following code to helloworld.c:
#include <stdio.h> int main() { printf("Hello World!\n"); return 0; }
The Intel Debugger does not support position independent executable (pie).
On some systems the compiler option -fpie is set by default. Use -fno-pie to disable pie.
Before compiling you must set the environment variables as described in the compiler User Guide.
Compile the application:
On Linux* OS, compile the application using the following command:
icc -debug -O0 helloworld.c -o helloworld
Following successful compilation, the compiler creates an executable named helloworld in the working directory.
Create a new file named helloworld.f90 in a working directory. Add the following code to helloworld.f90:
program main print *,"Hello World!" end program main
Open a shell and change to the working directory.
Compile the application:
On Linux* OS, compile the application using the following command:
ifort -debug -O0 helloworld.f90 -o helloworld
Following successful compilation, the compiler creates an executable named helloworld in the working directory.
Copyright © 2001-2011, Intel Corporation. All rights reserved.