How to build x264/libx264.dll in Windows
来源:互联网 发布:网络系统集成结课论文 编辑:程序博客网 时间:2024/06/06 01:14
最近用到了windows 下x264,发现需要生成windows lib,所以就找到了这篇文章。
文章链接:http://www.ayobamiadewole.com/Blog/Others/x264compilation.aspx
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.
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.
- How to build x264/libx264.dll in Windows
- How to build x264/libx264.dll in Windows
- How to build the environment of XPCOM in Windows XP
- How to build the environment of MSYS in the windows?
- How to build CZMQ 4.X in Windows.
- How to compile x264 on Windows?
- How to compile x264 on Windows
- How to use GCC to build DLL by DEF file in MinGW?
- [X264] MinGW编译x264,VC中调用libx264.dll
- How to build libDTS in the MSYS?
- How to build libA52 in the MSY?
- How to build giflib in the MSYS?
- How to build libpng in the MSYS?
- How to generate monkeyrunner build-in help?
- How to build OpenOCD for windows
- How to build Android Windows SDK
- How to build Android Windows SDK
- How to Call C# DLL in Delphi7
- Linux下的w和who命令
- 学习感悟
- Interbase6.5 Inno 安装脚本
- 虚函数实现多态(笔记整理)
- (JAVA 自学笔记)枚举续
- How to build x264/libx264.dll in Windows
- MFC中CString转换成char数组的问题
- 每天一道算法题1 判断字符串是否是回文字符串或者是否含有回文字符子串
- android中ViewGroup中onMeasure()方法 .
- 设计模式六大原则(1):单一职责原则
- Node.js Web Sockets and iOS
- android framework audio分析
- ViewGroup measure layout
- Spring实现定时启动任务