Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Does Qt support OpenMP?

Tags:

qt

openmp

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.

like image 269
nacho4d Avatar asked Feb 09 '10 08:02

nacho4d


1 Answers

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 lines to pass the OpenMP flags to the compiler :

QMAKE_CXXFLAGS += -fopenmp
LIBS += -fopenmp

Enjoy!

like image 64
Etienne Savard Avatar answered Sep 18 '22 03:09

Etienne Savard