问题
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
回答1:
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
来源:https://stackoverflow.com/questions/9815293/how-to-turn-on-openmp-when-using-qt-creator