tags:

views:

769

answers:

2

Hi, I am using OpenMP in my Visual Studio projects and currently thinking very seriously in changing to QT creator. (Doesn't Visual Studio suck?,I expect much more from Microsoft)

But anyway... Does QT creator support OpenMP? In case of that, what should I do to enable it? Or maybe is enabled by default? Do I need to do something special?

Thanks for your advices. Ignacio.

+5  A: 

Qt itself has no own C++ compiler, instead it uses existing, for example on Windows platform it is mingw. Officially migw supports OpenMP since 4.2.0

Dewfy
Thanks!, so Its is capable, but how do I activate OpenMP in QT?
nacho4d
It's not "in QT". It's "in my compiler", so it's really compiler-dependent. For GCC, use the `-fopenmp` option.
FX
You can still use the Microsoft C++ compiler with Qt and OpenMP, and just not use the Visual Studio IDE. For example, you could use Emacs as your editor and build the system using Makefiles. This may be less effort than setting up mingw, given you already have VC++ installed.
gavinb
@gavinb: I know about possibility of use MSVC compiler, but my installation of Qt also included mingv
Dewfy
+3  A: 

Does QT creator support OpenMP?

As someone else mentioned, it's not Qt itself that support OpenMP but the compiler.

What should I do to enable it?

If you have installed a recent Qt 4.6.x SDK (hint: latest QtCreator 1.3 is included), it comes with MinGW 4.4 which has OpenMP support built-in.

Do I need to do something special?

Edit your project .pro file and add the following line to pass the -fopenmp flag to the compiler :

QMAKE_CXXFLAGS += -fopenmp

Enjoy!

esavard