您的位置:首页 > 其它

使用msvc 编译 ffmpeg 1.1

2013-01-09 08:29 337 查看
Cmake

版本2.8.10.2
http://www.cmake.org/
http://www.cmake.org/cmake/resources/software.html

Perl(非必须)
http://www.perl.org/

ActivePerl版本5.16.1.1601,有64位版,这里用32位版

这里使用的是ActivePerl,IPP的例子编译的时候要用到
http://www.activestate.com/

Download the Free Community Edition
http://www.activestate.com/activeperl/downloads

Python
http://www.python.org/

ActivePython版本2.7.2.5,有64位版,这里用32位版,不要用3.X版本的

这里使用的是ActivePython

Download the Free Community Edition
http://www.activestate.com/activepython/downloads

上面三个软件要在PATH环境变量中,分别在命令行使用cmake、perl、python测试

Msinttypes
http://code.google.com/p/msinttypes/

解压stdint.h和inttypes.h复制到vs2008的vc的include目录,

inttypes.h复制到vs2010的vc的include目录

Yasm
http://yasm.tortall.net/
http://yasm.tortall.net/Download.html

?Win32 VS2010 .zip (for use with VS2010 on 32-bit Windows)

?Win64 VS2010 .zip (for use with VS2010 on 64-bit Windows)

?Win32 .exe (for general use on 32-bit Windows)

?Win64 .exe (for general use on 64-bit Windows)

4个版本都下,这里统一用32位版本,vs2010版本改名为yasm.exe放到vs2010的vc的bin目录,非vs2010版本也是改名yasm.exe分别放到vs2008的vc的bin目录和MinGW的bin目录

Nasm(非必须)
http://www.nasm.us/

这个是非必须的,下载个最新版本放到MinGW的bin目录

Llvm+clang

版本3.2
http://llvm.org/
http://llvm.org/releases/

下载LLVM source code和Clang source code

为了简单起见在MinGW的home目录编译llvm和clang,新建llvm-3.2.src目录,在下面家里llvm和build文件夹,将LLVM source code整个解压到llvm中,在llvm的tools目录中新建clang目录,将Clang source code整个解压到clang目录中

进入cmd命令行,进入build目录,执行命令:

Cmake -G "Visual Studio 9 2008" ../llvm

也可以用Cmake_gui修改,这样就生成了vs2008的sln文件

编译其中的libclang的release版本出来,

复制build\lib\Release目录下的libclang.lib到llvm\lib\Release目录

复制build\bin\Release目录下的libclang.dll到MinGW的bin目录

C99-to-C89 Converter & Wrapper
https://github.com/libav/c99-to-c89/

在MinGW下编译,依赖libclang库,修改Makefile.w32的CLANGDIR=../llvm-3.2.src/llvm

进入vs2008环境变量的MinGW使用Make -f Makefile.w32编译

将生成的c99conv.exe和c99wrap.exe放到MinGW的bin目录

Ffmpeg-1.1
http://ffmpeg.org/platform.html

使用vs2010环境的变量的MinGW,临时删除msys的Bin目录下的link.exe

./configure --toolchain=msvc

make

make install

 

这样默认是生成了a库,引入到vc工程中就可以进行源码级调试了,效率受不受影响还不知道。

 
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  FFMpeg VC VS 编译