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

Unix/Linux
REDHAT企业版LINUX5.0安装过程图解教程
Linux系统下安装phpmyadmin方法
RedHat Enterprise Linux 5下配置Apache+Mysql+Php
Linux和Windows双系统Grub丢失恢复
Linux系统下touch命令的使用方法
linux下面建立GPRS无线MODEM拨号的方法
redhat linux AS4 下配置无线网卡
让Linux操作系统开机默认进入文本模式
Linux文件权限的设置方法与技巧
linux chown与chmod命令的区别
Linux关机命令详细说明
linux系统 加载u盘、光盘、软盘方法
Linux系统下防止 ARP 欺骗_绑定IP地址和MAC地址
Linux系统中Mysql的安装备份与密码恢复
Linux系统下添加新硬盘,分区,格式化相关步骤
Linux系统下编译安装支持NTFS的内核模块
调整Linux磁盘分区的大小的方法
正确关闭Linux计算机的命令和方法
查看Linux系统下Raid信息
Linux下单网卡绑定多IP与多网卡共用单IP 的方法

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


出处:互联网   整理: 软晨网(RuanChen.com)   发布: 2009-11-01   浏览: 172 ::
收藏到网摘: 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