Which version of OpenMP implements gcc 4.5?

I am using Ubuntu 11.04. I have installed the compiler gcc 4.5 by using the command sudo apt-get install gcc 4.5 in terminal. Now I need the command to enable OpenMP. Is it gcc -fopenmp foo.c ?

@pl1nk I started from the beginning:

1st step=> sudo apt-get install build-essential

2nd step=> sudo apt-get install gcc 4.5

And now the output of gcc -v is:

**[email protected]:~$ gcc -v
Using built-in specs.
Target: i686-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Ubuntu/Linaro 4.5.2-8ubuntu4' --with-bugurl=file:///usr/share/doc/gcc-4.5/README.Bugs --enable-languages=c,c++,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-4.5 --enable-shared --enable-multiarch --with-multiarch-defaults=i386-linux-gnu --enable-linker-build-id --with-system-zlib --libexecdir=/usr/lib/i386-linux-gnu --without-included-gettext --enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.5 --libdir=/usr/lib/i386-linux-gnu --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --enable-plugin --enable-gold --enable-ld=default --with-plugin-ld=ld.gold --enable-objc-gc --enable-targets=all --disable-werror --with-arch-32=i686 --with-tune=generic --enable-checking=release --build=i686-linux-gnu --host=i686-linux-gnu --target=i686-linux-gnu
Thread model: posix
gcc version 4.5.2 (Ubuntu/Linaro 4.5.2-8ubuntu4)** 

In few words the same results....
What should I do now?
2022-07-25 17:27:49
Source Share
Answers: 1

Run update-alternatives --config gcc to be asked to pick the GCC variation you intend to make use of amongst those mounted.

After that you can run gcc with the picked variation.

2022-07-25 19:51:14