mp3播放器madplay移植过程发生错误(缺少zlib库,mad.h头文件,格式-L)

mp3播放器madplay移植过程发生错误

 

在配置libid3tag-0.15.1b,错误信息(一):

checking zlib.h usability... no
checking zlib.h presence... no
checking for zlib.h... no
configure: error: zlib.h was not found
*** You must first install zlib (libz) before you can build this package.
*** If zlib is already installed, you may need to use the CPPFLAGS
*** environment variable to specify its installed location, e.g. -I<dir>.

从上面的错误信息提示,可以知道要安装zlib库。

解决办法:

1、下载zlib-1.2.3.tar.gz,然后解压:tar xjf zlib-1.2.3.tar.gz

2、在zlib-1.2.3目录下执行:./configure --prefix=/work/drivers/21th_sound/app/tmp

3、make && make install

4、zlib安装成功

5、然后在libid3tag-0.15.1b执行:./configure --host=arm-linux --prefix=/work/drivers/21th_sound/app/tmp

6、如果使用上面的命令还显示错误,则执行:./configure --host=arm-linux --prefix=/work/drivers/21th_sound/app/tmp CPPFLAGS=-I/work/drivers/21th_sound/app/tmp/include LDFLAGS=-L/work/drivers/21th_sound/app/tmp/lib
 

 

 

在配置madplay-0.15.2b,错误信息(二)

checking machine/soundcard.h usability... no
checking machine/soundcard.h presence... no
checking for machine/soundcard.h... no
checking mad.h usability... no
checking mad.h presence... no

checking for mad.h... no
configure: error: mad.h was not found
*** You must first install libmad 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>.

从上面的错误信息,可以知道缺少头文件mad.h。

解决办法:

1、缺少mad.c文件,加上之,注意加上CPPFLAGS标志-I

执行:./configure --host=arm-linux --prefix=/work/drivers/21th_sound/app/tmp CPPFLAGS=-I/work/drivers/21th_sound/app/tmp/include LDFLAGS=-L/work/drivers/21th_sound/app/tmp/lib

 

 

 

在make编译madplay-0.15.2b,错误信息(三)

arm-linux-gcc -Wall -g -O2 /work/drivers/21th_sound/app/tmp/lib -o madplay madplay.o getopt.o getopt1.o version.o resample.o filter.o tag.o crc.o rgain.o player.o audio.o audio_aiff.o audio_cdda.o audio_hex.o audio_null.o audio_raw.o audio_snd.o audio_wave.o audio_oss.o  -L/work/drivers/21th_sound/app/madplay-0.15.2b -lmad -lid3tag -lm
/work/drivers/21th_sound/app/tmp/lib: file not recognized: Is a directory
collect2: ld returned 1 exit status
Makefile:433: recipe for target 'madplay' failed
make[2]: *** [madplay] Error 1
make[2]: Leaving directory '/work/drivers/21th_sound/app/madplay-0.15.2b'
Makefile:589: recipe for target 'all-recursive' failed
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory '/work/drivers/21th_sound/app/madplay-0.15.2b'
Makefile:340: recipe for target 'all' failed
make: *** [all] Error 2

解决办法:

1、./configure --help(配置文件的帮助信息)

2、make distclean

3、执行以下命令:(从上图可以知道,LDFLAGS -L要顶格来写,不要留空格)

./configure --host=arm-linux --prefix=/work/drivers/21th_sound/app/tmp CPPFLAGS="-I /work/drivers/21th_sound/app/tmp/include" LDFLAGS="-L/work/drivers/21th_sound/app/tmp/lib"

  • 1
    点赞
  • 13
    收藏
    觉得还不错? 一键收藏
  • 2
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值