gcc多线程支持-fopenmp

#!/bin/sh

g++ -O3 -c  ../../xx/xx.cpp -I../libfacedetect/  -Wno-deprecated-declarations  -I/xx/xx/software/include  -fopenmp

g++ -O3 -c  ../xx/xx/thumb.cpp -I../xx/src/ -fopenmp
g++ -std=c++0x   -o  thumb_xx  xx.o  xx.o xx.o   LibFaceDetectWrapper.o frameCut.o  ../libfacedetect/libFaceDetect.a   -I/../libfacedetect/  -I/xx/xx/software/include -L/xx/xx/software/lib -fopenmp  -lavfilter -lswscale  -lpostproc -lavformat  -lavcodec -lswresample  -lavutil -lz -lx264 -lx265 -pthread -lrt -lfdk-aac  -static 
rm *.o

strip thumb_xx  

注意:单个的g++ -c  xx.cpp  需要加上-fopenmp,链接也需要加上这个编译选项

你可能感兴趣的:(gcc多线程支持-fopenmp)