在Windows中使用MinGW编译X264
转自:http://www.cnblogs.com/xiongjiaji/archive/2012/06/08/2541265.html
参考:http://ayobamiadewole.com/Blog/Others/x264compilation.aspx
注意:安装完MinGW后,要把“安装路径\MinGW\bin”加到PATH环境变量中。否则在./configure的时候会“No working C compiler found”。
具体步骤如下:
For someone coming from a windows background, where you do virtually everything, using GUI probably with Visual studio or an equivalent IDE, compiling a program from the command line can be a daunting task.
This blog post will guide you through compiling and building the popular open source video encoding library on windows using the MinGW(Minimalist GNU on Windows).
First you need to download the x264 source code from http://x264.nl/ Or if you know how to use git, you can git clone the x264 from git://git.videolan.org/x264.git.
Then you should download MinGW from http://sourceforge.net/projects/mingw/files Download the mingw-get-inst-20111118.exe (591.9 kB) install it and during the installation steps, select all the check boxes. (直接到这里下载就可以了:http://sourceforge.net/projects/mingw/)
After the installation is completed(然后还要把环境变量加上), then from Start button , click All program, then click MinGW and then Click on MinGW shell, this brings up the following window
From the msys shell change your directory to the location where your x264 source code is, in my own case the x264 code is in the c: drive so I will simply Type cd c:\x264

Then type ./configure and press enter, this screen waits for some seconds and the bring

Then you can now type make and press enter, this will bring up the window below, showing the progress of the compilation process.

After the compilation is finished, if you look into your x264 directory you will find x264.exe file there.

Now compiling the x264 into a dynamic link library that can be used in Visual studio takes another process entirely. Open the MinGW bash once again and change the directory to the location of your x264 source code, just like you did previously.
Then type
./configure --disable-cli --enable-shared --extra-ldflags=-Wl,--output-def=libx264-120.def
or just
./configure --disable-cli --enable-shared --extra-ldflags=-Wl,--output-def=libx264.def

Now in libx264-120.def “120” is the version of the x264 you are using, you can find the version of the x264 you are using by opening the x264.h file in your x264 source folder you will see something like this #define X264_BUILD 120 depending on your version.
You can now type the make command and press enter and you will find the libx264-120.dll in your x264 source folder. Then rename libx264-120.dll to libx264.dll and you have you dynamic link library to work with.

If you wish to generate the Visual Studio .lib file to work with then open a Visual Studio command prompt, and change the directory to the location of the x264 source .
Then run this command
LIB /DEF:libx264.def
Then press enter

And your libx264.lib would be generated.
在Windows中使用MinGW编译X264的更多相关文章
- 手把手教你在Windows下使用MinGW编译libav(参考libx264的编入)
转自:http://www.th7.cn/Program/cp/201407/242762.shtml 手把手教你在Windows下使用MinGW编译libav libav是在Linux下使用纯c语言 ...
- QT中使用MinGW 编译的protobuf库--包含库的生成和使用
QT中使用MinGW 编译的protobuf库--包含库的生成和使用 0前言 1准备工作 2生成protobuf库文件 3在QT中测试protobuf的使用 4结语 0前言 最近要在QT中使用prot ...
- 在Windows下利用MinGW编译FFmpeg
目录 [隐藏] 1 环境与软件 2 第一步:安装MinGW 3 第二步:配置编译环境 4 第三步:配置SDL 5 第四步:编译 5.1 编译faac 5.2 编译fdk-aac 5.3 编译x264 ...
- Windows 系统 vs2012 MinGW 编译ffmpeg 静态库
Windows系统下 vs2012编译ffmpeg 动态库 前面已经有文章讲述,本文将讲述如果编译生成ffmpeg静态库以方便 在vs2012下调用. 准备工作:安装MinGW环境,修改ffmpeg配 ...
- [X264] MinGW编译x264,VC中调用libx264.dll-------------<参考转>
1. 下载并按照MinGW,最好就缺省按照 http://sourceforge.net/projects/ ... ler/mingw-get-inst/ 把C:\MinGW\bin添加 ...
- MinGW和MSYS区别和关系以及MinGW&MSYS在Win7中安装并编译x264
http://blog.csdn.net/freeape/article/details/50555003
- Windows下使用MINGW编译ffplay
之前考虑到需要快速配置编译ffplay,使用了比较暴力的方法,具体可以参考编译ffplay.exe简化版. 这里介绍下相对规范的做法. 前提:已经安装了Windows下GCC开发环境--MINGW+m ...
- 再次尝试windows下msys+MinGW编译ffmpeg
电脑上安装太多的开源库,环境变量里面一些常用的头文件都有几种,以前使用的编译ffmpeg的方法现在常常提示错误.从config.log中看,这些错误往往都是一些头文件引用错误导致.由于项目中继续编译自 ...
- windows下使用mingw编译python扩展模块
环境: 1.python2.7.2 2.mingw20120426 说明: PYTHON_HOME:不做特殊说明的话,默认代表python的安装路径. MINGW_HOME:不做特殊说明的话,默认代表 ...
随机推荐
- IIS 7.5 配置10W高并发
原文: http://www.myhack58.com/Article/sort099/sort0100/2012/35585.htm 原文: http://www.myhack58.com ...
- windows中快速停掉占用某端口的进程的方法
在Windows操作系统中,我们在启动一个tomcat服务器时,经常会发现8080端口已经被占用的错误,而我们又不知道如何停止这个tomcat服务器. 本文将通过命令来强行终止这个已经运行的tomca ...
- cad2013
## ribbon界面? ribbon界面是一种设计ui, 可以认为是传统的 菜单和工具栏 组合. 是 用于 实时显示 + 面向结果的 设计ui 但并不是所有的程序都适合. ribbon 并不是 ...
- HDU4887_Endless Punishment_BSGS+矩阵快速幂+哈希表
2014多校第一题,当时几百个人交没人过,我也暴力交了几发,果然不行. 比完了去学习了BSGS才懂! 题目:http://acm.hdu.edu.cn/showproblem.php?pid=4887 ...
- Jquery Validate 正则表达式实用验证代码
jQuery.validate 的正则验证功能,包括手机号码.电话号码.邮政编码.QQ号码.IP地址.字母和数字.中文的验证等. 手机号码验证 以下为引用内容: jQuery.validator.a ...
- TopCoder SRM 590
第一次做TC,不太习惯,各种调试,只做了一题...... Problem Statement Fox Ciel is going to play Gomoku with her friend ...
- LR测试心得
====================测试方案—优化前—优化后 每一项至少两份报告==================================== url录制方式录制出来的脚本mode是HT ...
- show processlist 其中status详解(适用于所有概况)
mysql show processlist分析 2011-04-11 16:13:00 分类: Mysql/postgreSQL mysql> show processlist; +—–+—— ...
- NGUI 粒子显示在上级
http://bbs.taikr.com/thread-2272-1-1.html [NGUI]3.0+版本,粒子在UI后面显示 -- : 48人阅读 评论() 收藏 举报 [Unity3D][NGU ...
- ris'In App Purchase总结
原地址:http://www.cocoachina.com/bbs/read.php?tid=38555&page=1 In App Purchase属于iPhone SDK3.0的新特性,用 ...