我在使用XCode的命令行工具編譯Mac上的x264(http://www.videolan.org/developers/x264.html)時遇到問題。下面的步驟不起作用:在Mac OS X上編譯x264時遇到問題
git clone git://git.videolan.org/x264.git
cd x264
./configure
make
這最終給你以下錯誤:
gcc -Wshadow -O3 -ffast-math -m64 -Wall -I. -I. -falign-loops=16 -mdynamic-no-pic -arch x86_64 -std=gnu99 -mpreferred-stack-boundary=5 -I/usr/local/include -I/usr/local/include -fomit-frame-pointer -fno-tree-vectorize -c -o x264.o x264.c
In file included from ./extras/cl.h:27,
from common/opencl.h:31,
from common/common.h:209,
from x264.c:33:
./extras/cl_platform.h:64:10: warning: #warning This path should never happen outside of internal operating system development. AvailabilityMacros do not function correctly here!
In file included from common/opencl.h:31,
from common/common.h:209,
from x264.c:33:
./extras/cl.h:1165: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘cl_mem’
./extras/cl.h:1175: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘cl_mem’
./extras/cl.h:1187: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘cl_int’
./extras/cl.h:1191: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘cl_int’
./extras/cl.h:1196: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘cl_int’
./extras/cl.h:1199: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘cl_int’
./extras/cl.h:1202: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘void’
make: *** [x264.o] Error 1
你如何編譯X264爲Mac OS X採用最新的XCode命令行工具?