Windows下編譯最新的x264

來源:互聯網
上載者:User

    X264更新的比較快,每天都有更新,但演算法模組,基本結構是沒有多大變化的。x264都是用C語言寫的包括C99,但C99文法是在VC中是沒法用的(當然有精力可以全部改成C89),產生的.a庫是也是沒法調用的,如何轉化成可用.lib庫就比較重要了。

1 下載mingw+msys進行配置,這裡有已配置好的,直接下載用就可以了http://code.google.com/p/msys-cn/wiki/ChapterInstallation2 下載最新的x264http://videolan.mirror.aussiehq.net.au/x264/snapshots/解壓到MSYS目錄下home檔案下3 編譯x264    進入當前x264所在目錄
編譯 x264 ./configure --enable-shared make 可以看到會產生libx264-112.dll4 利用VC提供的工具匯出lib下載poxportshttp://download.csdn.net/source/3036251解壓到VC所在的安裝目錄,比如說C:/Program Files/Microsoft Visual Studio 8/VC/bin,解壓以後pexports.exe拷貝至bin目錄下匯出lib庫pexports libx264-112.dll > libx264-112.def 
lib /machine:ix86 /def:libx264-112.def5 測試匯出的庫是否正確拷貝新產生的庫libx264-112.lib和libx264-112.dll到建立的win32 工程下拷貝原x264目錄下的x264.h與x264_config.h至所建的win32工程下下載pthreadGC2.dll和stdint.h用如下程式測試#include <iostream>#include <string>#include "stdint.h"extern "C"{#include "x264.h"#include "x264_config.h"};using namespace std;int main(){x264_param_t param;x264_param_default(&param);return 0;}
相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.