记录x264编译

下载http://videolan.mirror.aussiehq.net.au/x264/snapshots/
编译要注意编译器是x86 or x64,如果是64位一定要编译64bit的想64,否则会报找不到函数的错误(LNK2019未定义引用),即使包含目录正确。
具体方法:(转自http://blog.sina.com.cn/s/blog_5f435c130102wq1x.html)

  1. Download from here http://xhmikosr.1f0.de/tools/ file named as MSYS_MinGW-w64_GCC_492_x86-x64_Full.7z and extract folder MSYS into root of disk C:/, for example.
    So now we have C:\MSYS folder.

  2. Now we need to run post-install script to configure build environment.
    Run C:\MSYS\postinstall\pi.bat

To the question “Do you have MinGW installed? [yn ]” answer Y.
“Where is your MinGW installation?” - type C:/MSYS/mingw

  1. Download and compile necessary components.
  1. tar xvjf last_x264.tar.bz2

  2. Configure -
    cd ~/x264-snapshot-20130917-2245
    ./configure --cross-prefix=x86_64-w64-mingw32- --host=x86_64-w64-mingw32 --enable-shared --disable-asm
    (默认安装在c:/MSYS/usr/local下)

  3. Build and install -
    make -j4
    make install

得到的在/usr/local下,直接把lib/libx264.dll.a 改成libx264.lib
关于VS和qt配置
vs配置包含目录,指定为local下的include,链接器中输入添加libx264.lib,注意吧bin/dll文件和lib文件拷到cpp同目录下。

qt同样拷贝dll和lib到编译的debug目录,
pro文件:
LIBS += …/libx264.lib
INCLUDEPATH += …/include

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值