在Windows中应用MinGW编译X264
来源:互联网 发布:阿里云邮箱服务器地址 编辑:程序博客网 时间:2024/05/18 03:02
在Windows中应用MinGW编译X264
Admin
2012年6月8日
参考:http://ayobamiadewole.com/Blog/Others/x264compilation.aspx
重视:安装完MinGW后,要把“安装路径\MinGW\bin”加到PATH景象变量中。不然在./configure的时辰会“No working C compiler found”。
具体步调如下:
For someone coming a windows background, where you do virtually everything, using GUI probably with Visual studio or an equivalent IDE, compiling a program 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 http://x264.nl/ Or if you know how to use git, you can git clone the x264 git://git.videolan.org/x264.git.
Then you should download MinGW http://sourceforge.net/projects/mingw/files Download the mingw-get-inst-20111118.exe (591.9 kB) install it and during the installation steps, all the check boxes. (直接到这里下载就可以了:http://sourceforge.net/projects/mingw/)
After the installation is completed(然后还要把景象变量加上), then 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编译X264
- 在Windows中使用MinGW编译X264
- X264 利用MinGW 在windows 下的编译
- 在Windows下用Mingw 4.5.2编译X264
- X264 利用MinGW 在windows 下的编译
- X264 利用MinGW 在windows 下的编译
- 一步一步在Windows下用MinGW编译x264(x264-snapshot-20160119-2245)
- windows下使用Mingw编译x264
- MinGW+msys windows 下编译 x264
- windows下使用MinGW编译ffmpeg、x264
- MinGW+msys windows 下编译 x264
- MinGW和MSYS区别和关系以及MinGW&MSYS在Win7中安装并编译x264
- ffmpeg和x264在mingw下编译
- [X264] MinGW编译x264,VC中调用libx264.dll
- mingw编译x264
- ffmpeg在windows下使用MinGW+msys+VS2015编译(x86或64版本,链接x264库,VS2015中可debug调试)
- windows下使用MinGW和msys编译x264
- 用GDB调试程序(1)
- C# Heap(ing) Vs Stack(ing) in .NET: Part II
- Darwin Streaming Server 6.0.3 - setup, customization, plugin or module development, performance and
- source VS exec
- 加班
- 在Windows中应用MinGW编译X264
- 工作队列(workqueue) create_workqueue/schedule_work/queue_work
- Flex中画箭头
- Android中MediaStore使用示例
- select, semop 等阻塞的系统调用返回值的检查
- 移动云计算应用开发入门经典
- HTML5 模板
- error: longjmp causes uninitialized stack frame
- 深入理解ARM体系架构(S3C6410)---UART实例