友善之臂 madplayer 移植过程补充


天在看友善之臂 QQ2440的用户手册,其中的madplayer移植,自己试了试,在手册之外的一点东西,可能会对你有一点点的帮助。

www.bkjia.com @bkjia:~/creek/madplay/src-x86/libid3tag-0.15.1b$./configure --prefix=/home/creek/creek/madplay/target-x86/
得到如下提示
configure: error: zlib.h was not found
*** You must first install zlibz(libz) before you can build this package.
*** If libmad is already installed, you may need to use the CPPFLAGS
*** environment variable to specify its installed location, e.g. -I<dir>.
看了一下/lib中有相应的库,可是改成相应的目录却仍然不能configure,于是到zlib的官方网站下来source code,按照hi.baidu.com/lanfeng143/blog/item/0f9cd03dc51cdd0abba16741.html的方法,根据提示知道目录为/usr/include
www.bkjia.com @bkjia:~/creek/madplay/src-x86/libid3tag-0.15.1b$./configure --prefix=/home/creek/creek/madplay/target-x86/ CPPFLAG=-I/usr/include
顺利通过。

www.bkjia.com @bkjia:~/creek/madplay/src-x86/libmad-0.15.1b$ make
时会出现下面这个错误
cc1: error: unrecognized command line option "-fforce-mem"
make[2]: *** [version.lo] Error 1
make[2]: Leaving directory `/home/creek/creek/madplay/src-x86/libmad-0.15.1b'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/creek/creek/madplay/src-x86/libmad-0.15.1b'
百度了一下,原因是GCC3.4以上已经没有-fforce-mem选项,找到相应的makefile,将该选项删除就OK了!

www.bkjia.com @bkjia:~/creek/madplay/src-x86/madplay-0.15.2b$ ./configure --prefix=/home/creek/creek/madplay/target-x86/ --CPPFLAGS=-I/home/creek/creek/madplay/target-x86/include --LDFLAGS=-L//home/creek/creek/madplay/target-x86/lib
configure: error: unrecognized option: --CPPFLAGS=-I/home/creek/creek/madplay/target-x86/include
Try `./configure --help' for more information.
按照手册上的内容输入,出现错误了。解决的办法就去掉那两个--,如下
www.bkjia.com @bkjia:~/creek/madplay/src-x86/madplay-0.15.2b$ ./configure --prefix=/home/creek/creek/madplay/target-x86/ CPPFLAGS=-I/home/creek/creek/madplay/target-x86/include LDFLAGS=-L//home/creek/creek/madplay/target-x86/lib
然后PASS

最后顺利放出了声音

相关内容