How to turn on OpenMP when using Qt creator

13,165

Try next in your .pro file

in case msvc2010

QMAKE_CXXFLAGS+= -openmp
QMAKE_LFLAGS +=  -openmp

or

QMAKE_CXXFLAGS+= -fopenmp
QMAKE_LFLAGS +=  -fopenmp

in case gcc

Share:
13,165
Jeanno
Author by

Jeanno

Updated on July 28, 2022

Comments

  • Jeanno
    Jeanno almost 2 years

    If I am building the project from Qt creator using VS 2010 compiler, how do i enable OpenMP (when building from visual studio you just enable the feature) Thanks

  • Z boson
    Z boson almost 10 years
    MSVC's linker does not need or accept -openmp so you should not set QMAKE_LFLAGS += -openmp.