当前位置: 首页 > 图文教程 > 操作系统 > Unix/Linux > 如何编译xvidcore-0.9.1(转帖)

Unix/Linux
tar解压命令详解
Linux操作系统软件的基本安装和卸载
SUSE Linux登录出现黑屏
RedHat9详细安装图解
Redhat Linux系统下磁盘配额的设置
RedHat LINUX桌面切换和用户管理技巧
创建Linux之USB启动盘
Linux 修改系统日期和时间
使ssh登陆不用输入密码的方法
Linux操作系统安全配置步骤
linux-2.6内核升级详细文档
Apache 安装详细说明
LINUX系统apache基于IP,基于port和基于域名的三种虚拟主机的配置方法
redhat下磁盘配额设置!
Linux系统下安装软件,程序
Linux 操作系统的用户和用户组管理
Linux下载工具wget和axel简介
RHEL5 Squid透明代理服务器配置过程详细说明
Linux系统下文件的压缩、打包与解压
Linux系统下快速删除某个目录下大量文件

Unix/Linux 中的 如何编译xvidcore-0.9.1(转帖)


出处:互联网   整理: 软晨网(RuanChen.com)   发布: 2009-11-01   浏览: 158 ::
收藏到网摘: n/a

自己想写的,既然在网上找到了,也就copy 过来了。我是用VC6编译的asm文件,然后用.net 2003编译的.c文件。
如何编译xvidcore-0.9.1一、把如下三个文件由UNIX格式转换成DOS格式 1、...\xvidcore-0.9.1\examples\Makefile 2、...\xvidcore-0.9.1\build\generic\Makefile 3、...\xvidcore-0.9.1\build\win32\libxvidcore.dsp 转换方法一: 1、用写字板打开其中一个文件(比如,...\xvidcore-0.9.1\examples\Makefile),“文件”-〉“另存为” 2、把“保存类型”改为“文本文档 - MS-DOS格式”,文件名自取(比如 a) 3、关闭写字板,删除文件...\xvidcore-0.9.1\examples\Makefile,把刚才保存的a.txt改名为Makefile 转换方法二: 1、用UltraEdit打开其中一个文件(比如,...\xvidcore-0.9.1\examples\Makefile),打开时会有对话框提示要不要转换成DOS格式, 选“是” 2、用UltraEdit新建一个文件,把刚才打开的文件全部复制到新建的文件中,把新建的文件保存(文件名自取,如 a ) 3、删除文件...\xvidcore-0.9.1\examples\Makefile,把刚才保存的a.txt改名为Makefile二、下载新的nasm.exe 链接:www.sf.net/projects/nasm 或者直接下载这个版本(2003/3/12最新版0.98.36): http://easynews.dl.sourceforge.net/sourceforge/nasm/nasm-0.98.36-win32.zip 下载解压后文件名为nasmw.exe,更名为nasm.exe,保存到VC的bin目录下(比如我的VC 6.0装在D:\Program Files\目录下, 那就放到这里:D:\Program Files\Microsoft Visual Studio\VC98\Bin\ 好,到此除了xvid_bench工程外,其余四个(xvid_encraw、xvid_decraw、xvid_stat、odivx_enc_dec)都能编译通过但还是有一个警告:D:\xvidcore-0.9.1\src\bitstream\mbcoding.c(194): warning C4146: unary minus operator applied to unsigned type, resultstill unsigned意思是一元的“-” 操作符用在无符号整型数上,结果仍然是无符号整型数;我不知道怎么能搞定它,是不是把警告级别调整一下就行了?三、如何编译xvid_bench工程 1、点击“Project”->“Settings” 2、在弹出的对话框左边,选择xvid_bench工程 3、在C/C++选项卡里,找到Preprocessor definitions一栏,添加两个宏定义:ARCH_IS_32BIT,ARCH_IS_IA32 恭喜你,大功告成!附:《How to Compile XviD with Microsoft Visual C++ 6.0》 Written by David CarrollLast updated: January 1, 2003OK,you've got your copy of Microsoft Visual C++ 6.0. You should be able tojust download the source code, click on the project file, and a fewsecond later, you'll have the Xvid Binary. Right? Well, unfortunately,it's not that easy. However, it's not that hard either.I. Downloading Necessary FilesXvid depends on a number of libraries and programs that do not come standard with Microsoft Visual C++ 6.0.You need:1) Service Pack 5 for Visual Studio 6 - http://msdn.microsoft.com/vstudio/downloads/updates/sp/vs6/sp5/default.aspIdon't believe you actually need Service Pack 5 to compile Xvid However,you should download it to get all the latest bug fixes and runtimelibraries. Trust me, it'll make your life easier later when you try tocompile other programs. You can download the service pack or order iton CD from the Microsoft Developers Network (MSDN) by clicking the linkabove.2) NASM - the famous Netwide Assembler - http://sourceforge.net/projects/nasm/Xvid uses NASM to "compile" the code written in assembly language (the *.asm files). Download the Win32 binary.3) DirectX 8.1b SDK - http://msdn.microsoft.com/library/default.asp?url=/downloads/list/directx.aspTobuild the DirectShow filter, you need the DirectX SDK (SoftwareDevelopment Kit). This SDK is not available by itself on CD, but theMicrosoft Platform SDK CD includes the DirectX SDK (along with severalother SDK's like the Windows Core SDK, Media Player SDK, etc.). You canorder the Microsoft Platform SDK CD from http://www.microsoft.com/msdownload/platformsdk/sdkupdate/II. Configuring the Compiler1) Installing Service Pack 5TheService Pack is easy to install since it comes with an installer. Theinstaller's filename is "setupsp5.exe". Just find the file anddouble-click it.2) Installing and Configuring NASMa) Unzip the file to an easy to remember directory of your choosing (i.e., "C:\DEV\NASM")b)Xvid expects the filename to be "nasm.exe" (probably because all otherversions except the Win32 version has that name). For some reason, theWin32 version NASM has a filename of "nasmw.exe." I recommend making acop