gcc多线程支持-fopenmp

来源:互联网 发布:网络调教男奴手段 编辑:程序博客网 时间:2024/05/02 13:03

#!/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,链接也需要加上这个编译选项

0 0