There are many code examples using openmp, but it is less obvious exactly how you can actually compile and experiment with openmp. On fedora core 5, gcc 4.1 already has openmp support through compiler modification and openmp library. Make sure you have libgomp installed. Using an openmp example from http://www.kallipolis.com/openmp/1.html, you can compile the source code with the following command line:
g++ -fopenmp -fstrict-aliasing -fomit-frame-pointer -Wall -pedantic -ansi -g -O2 openmp_taylor.cpp -o openmp_taylor -lgomp
The important things to note here are -fopenmp (tells gcc to enable openmpp support by parsing openmpp #pragma directives) and -lgomp (the openmp library APIs).