感谢支持
我们一直在努力

RedHat Linux 9.0 下编译MPlayer-1.0rc3

一.资料准备
1.主程序:MPlayer-1.0rc3
2.Codecs:essential-20071007.tar.bz2
3.Wincodecs:windows-essential-20071007.zip
4.皮肤:KDE-0.3.tar.bz2
二.安装过程
编码包要安装在/usr/lib/codecs和/usr/lib/wincodecs目录下,所以先要新建文件夹。(也可以在编译过程中指定特定的文件夹)

1.安装源码包


# mkdir /usr/lib/codecs


# mkdir /usr/lib/wincodecs


#tar jxvf  essential-20071007.tar.bz2

# unzip windows-essential-20071007.zip


# mv essential-20071007/*  /usr/lib/codecs 


# mv windows-essential-20071007/* /usr/lib/wincodecs 


2.编译安装MPlayer


# tar jxvf MPlayer-1.0rc1.tar.bz2


# cd mplayer-1.0pre1


# ./configure –prefix=/usr/local/ –enable-gui –enable-freetype –codecsdir=/usr/lib/codecs/ –win32codecsdir=/usr/lib/wincodecs/ –language=zh_CN

接下来继续


# make


在这里会出错


/usr/include/netinet/in.h:259: parse error before ‘(‘ token /usr/include/netinet/in.h:259: parse error before “__u32” /usr/include/netinet/in.h:260: parse error before ‘(‘ token /usr/include/netinet/in.h:260: parse error before “__u16” /usr/include/netinet/in.h:262: parse error before ‘(‘ token /usr/include/netinet/in.h:262: parse error before “__u32” /usr/include/netinet/in.h:264: parse error before ‘(‘ token /usr/include/netinet/in.h:264: parse error before “__u16” stream_dvd.c: In function `dvd_parse_chapter_range’: stream_dvd.c:168: warning: passing arg 2 of `strtol’ from incompatible pointer type make[1]: *** [stream_dvd.o] Error 1 make[1]: Leaving directory `/home/monde/MPlayer-1.0rc2/stream’ make: *** [stream/stream.a] Error 2



解决方法如下(原因可能是Mplayer 不识别函数 ntohl,btohs,htonl 等)


编辑/usr/include/netinet/in.h文件


[root@localhost MPlayer-1.0rc3]# vi /usr/include/netinet/in.h


在__BEGIN_DECLS下面添加如下代码:


#undef ntohl


#undef ntohs


#undef htonl


#undef htons


执行make clean,再执行make,就可以了



# make install

赞(0) 打赏
转载请注明出处:服务器评测 » RedHat Linux 9.0 下编译MPlayer-1.0rc3
分享到: 更多 (0)

听说打赏我的人,都进福布斯排行榜啦!

支付宝扫一扫打赏

微信扫一扫打赏