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

Unix/Linux
Linux系统下如何监视系统资源使用率
怎样在Red Hat Linux上使用BIND建立DNS服务器
多点触控技术终于在Linux中实现
中科红旗Linux桌面7.0版引入QtSDK组件
系统启动管理器与GRUB
Linux系统下配置CVS集成cvstrac
解析Linux操作系统下usr的目录结构
Linux系统与Windows系统的线程有何不同
黑客怎样入侵Linux系统
维护inittab配置文件时需要注意的事项
FreeBSD为powerd设置cpu最小工作频率
如何配置Linux才能保证其系统的安全
光驱的软开关与限速简介
新手教程之创建锁文件的方法
双系统计算机怎样卸载其中一个?
运行Linux时的快捷键使用
phpMyAdmin安装方法及介绍
Wine中中文存在很多的乱码怎么解决?
Linux教程:tail命令的巧妙应用
Wget命令来浏览网页的方法

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


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