Complie and Debug x264 in VS2010 with Intel Complier(Parallel Studio XE 2011)
2011-06-09 11:59:09| 分类: x264 mplayer ffm |字号 订阅
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: