歡迎來到Linux教程網
Linux教程網
Linux教程網
Linux教程網
Linux教程網 >> Linux編程 >> Linux編程 >> 友善之臂 madplayer 移植過程補充

友善之臂 madplayer 移植過程補充

日期:2017/3/1 10:19:32   编辑:Linux編程

天在看友善之臂 QQ2440的用戶手冊,其中的madplayer移植,自己試了試,在手冊之外的一點東西,可能會對你有一點點的幫助。

www.linuxidc.com @linuxidc:~/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.linuxidc.com @linuxidc:~/creek/madplay/src-x86/libid3tag-0.15.1b$./configure --prefix=/home/creek/creek/madplay/target-x86/ CPPFLAG=-I/usr/include
順利通過。

www.linuxidc.com @linuxidc:~/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.linuxidc.com @linuxidc:~/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.linuxidc.com @linuxidc:~/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

最後順利放出了聲音

Copyright © Linux教程網 All Rights Reserved