Complie and Debug x264 in VS2010 with Intel Complier(Parallel Studio XE 2011) 2011-06-09 11:59:0

Complie and Debug x264 in VS2010 with Intel Complier(Parallel Studio XE 2011)  

2011-06-09 11:59:09|  分类: x264 mplayer ffm |字号 订阅

You do not need to modify the x264 source code and you can keep the code up to date as well as debug it in Visual Studio 2010.

PRECONDITIONS:
1.install MSYS and add its bin to PATH ( for me it is C:\msys\1.0\bin )
  ensure you can access to ‘sh’ command in CMD
2.install MINGW and add its bin to PATH
  ensure you can access to 'make' command in CMD
3.install VS2010 and Parallel Studio XE 2011(Intel C++ Complier 12)
  ensure you can see following shortcuts in Start menu: (My OS is win7 64bit)
  Intel Parallel Studio XE 2011 
    -->Command Prompt
       -->Parallel Studio XE with Intel Compiler XE __VERSION__
          -->IA-32 Visual Studio 2010 mode
  run "IA-32 Visual Studio 2010 mode", and input "icl.exe" command to ensure you can access to the complier.


STEP 1:
get lastest x264 source code from git://git.videolan.org/x264.git

STEP 2:
create 'config_only.bat' in x264 root folder.
config_only.bat content:
-------------------------
call "%ICPP_COMPILER12%bin\ipsxe-comp-vars.bat" ia32 vs2010
@echo on
cd /d %~dp0
@echo on
sh config.sh %*
-------------------------

STEP 3:
create 'make_only.bat' in x264 root folder.
make_only.bat content:
-------------------------
call "%ICPP_COMPILER12%bin\ipsxe-comp-vars.bat" ia32 vs2010
@echo on
cd /d %~dp0
@echo on
make
-------------------------

STEP 4:
create 'config.sh' in x264 root folder
config.sh content:
-------------------------
#!/bin/bash
CC=icl ./configure $*
-------------------------
After finishing step 4, you can actually configure and make x264 by running config_only.bat and then make_only.bat.
But if you want to use vs2010 to analyze or debug x264, you need to create a vs project.

STEP 5:
(Because I am using the Chinese version of VS2010, some names of menu may be not excatly the same with yours )
(1)File-->New-->Create Project from Exist Code
(2)Select 'Visual C++' for project type, click NEXT and then input project name, and import the project files. click  NEXT.
(3)Select 'Use external build system'(don't know what exactly it is in English version), click NEXT
(4)for debug config:
           build command line : make_only.bat
           rebuild command line : make clean&&config_only.bat --enable-debug&&make_only.bat
           clean command line : make clean
           output : x264.exe
     click NEXT
     for release config
           build command line : make_only.bat
           rebuild command line : make clean&&config_only.bat&&make_only.bat
           clean command line : make clean
           output : x264.exe
     click to Finish.

For the first time of building and changing between DEBUG and RELEASE, you need to run rebuild command
Try to build and debug it now.     


if you have any problems, you can contact me by my email:

  • 1
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值