解决方案 需要将标志 -fopenmp 添加到makefile的编译标志中。 例如: CFLAGS = -w -lm -lrt -lpthread -fpermissive -fopenmp (在makefile的CFLAGS中添加了 -fopenmp)