Qt: OpenMP, undefined reference 错误
Qt 默认情况下不能直接编译OpenMP程序; 在gcc中有对应的-fopenmp option; 在Qt中有
QMAKE_CXXFLAGS += -fopenmp
同时, LIBS += -lgomp -lpthread 添加相应库, 即可解决undefined reference 错误
Bring Reality to Games
Qt 默认情况下不能直接编译OpenMP程序; 在gcc中有对应的-fopenmp option; 在Qt中有
QMAKE_CXXFLAGS += -fopenmp
同时, LIBS += -lgomp -lpthread 添加相应库, 即可解决undefined reference 错误