1 安装MingW交叉编译环境。见 http://blog.csdn.net/wutong_login/archive/2009/08/02/4401509.aspx
2 下载x264的源码。见http://downloads.videolan.org/pub/videolan/x264/snapshots/
3 下载 pthreads 源码。见ftp://sources.redhat.com/pub/pthreads-win32/pthreads-w32-2-8-0-release.tar.gz
4 编译 pthreads
make clean GC-static(生成静态库) 或 make clean GC(生成动态库)
5 COPY pthread目录下的*.h文件到 /mingw/include 目录下。
COPY pthread目录下的pthreadGC2.dll或pthreadGC2.a到/mingw/lib
6 编译 x264 ,执行
./configure --enable-shared
命令成功后,其中会有 pthread: yes 一行。
7 执行make 。
如果使用的是pthread的动态库,在发布时需要一起发布 pthreadGC2.dll