当前位置: 技术问答>linux和unix
mplayer arm 移植的问题
来源: 互联网 发布时间:2016-01-04
本文导语: 我在做arm上的移植,用的是arm2410,编译器是arm-linux-g++(3.4.1) 在编译过程中出现这样的问题! make -C libmpcodecs make[1]: Entering directory `/root/mplayer/MPlayer-0.92.1/libmpcodecs' arm-linux-gcc -c -O4 -pipe -ffast-math -fomit-frame-pointer -...
我在做arm上的移植,用的是arm2410,编译器是arm-linux-g++(3.4.1)
在编译过程中出现这样的问题!
make -C libmpcodecs
make[1]: Entering directory `/root/mplayer/MPlayer-0.92.1/libmpcodecs'
arm-linux-gcc -c -O4 -pipe -ffast-math -fomit-frame-pointer -I. -Inative -I..
-I../libmpdemux -I../loader -D_GNU_SOURCE -o ad_libmad.o ad_libmad.c
ad_libmad.c:23:17: mad.h: No such file or directory
ad_libmad.c:27: error: field `synth' has incomplete type
ad_libmad.c:28: error: field `stream' has incomplete type
ad_libmad.c:29: error: field `frame' has incomplete type
ad_libmad.c: In function `read_frame':
ad_libmad.c:75: error: `MAD_ERROR_BUFLEN' undeclared (first use in this function)
ad_libmad.c:75: error: (Each undeclared identifier is reported only once
ad_libmad.c:75: error: for each function it appears in.)
ad_libmad.c: In function `init':
ad_libmad.c:88: error: `MAD_MODE_SINGLE_CHANNEL' undeclared (first use in this function)
ad_libmad.c: At top level:
ad_libmad.c:104: error: parse error before "sample"
ad_libmad.c: In function `scale':
ad_libmad.c:106: error: `sample' undeclared (first use in this function)
ad_libmad.c:106: error: `MAD_F_FRACBITS' undeclared (first use in this function)ad_libmad.c:109: error: `MAD_F_ONE' undeclared (first use in this function)
ad_libmad.c: In function `decode_audio':
ad_libmad.c:130: error: `mad_fixed_t' undeclared (first use in this function)
ad_libmad.c:130: error: parse error before "const"
ad_libmad.c:134: error: dereferencing pointer to incomplete type
ad_libmad.c:135: error: dereferencing pointer to incomplete type
ad_libmad.c:136: error: `left_ch' undeclared (first use in this function)
ad_libmad.c:136: error: dereferencing pointer to incomplete type
ad_libmad.c:137: error: `right_ch' undeclared (first use in this function)
ad_libmad.c:137: error: dereferencing pointer to incomplete type
make[1]: *** [ad_libmad.o] Error 1
make[1]: Leaving directory `/root/mplayer/MPlayer-0.92.1/libmpcodecs'
make: *** [libmpcodecs/libmpcodecs.a] Error 2
[root@localhost MPlayer-0.92.1]# make
make -C libmpcodecs
make[1]: Entering directory `/root/mplayer/MPlayer-0.92.1/libmpcodecs'
arm-linux-gcc -c -O4 -pipe -ffast-math -fomit-frame-pointer -I. -Inative -I..
-I../libmpdemux -I../loader -D_GNU_SOURCE -o ad_libmad.o ad_libmad.c
ad_libmad.c:23:17: mad.h: No such file or directory
ad_libmad.c:27: error: field `synth' has incomplete type
ad_libmad.c:28: error: field `stream' has incomplete type
ad_libmad.c:29: error: field `frame' has incomplete type
ad_libmad.c: In function `read_frame':
ad_libmad.c:75: error: `MAD_ERROR_BUFLEN' undeclared (first use in this function)
ad_libmad.c:75: error: (Each undeclared identifier is reported only once
ad_libmad.c:75: error: for each function it appears in.)
ad_libmad.c: In function `init':
ad_libmad.c:88: error: `MAD_MODE_SINGLE_CHANNEL' undeclared (first use in this function)
ad_libmad.c: At top level:
ad_libmad.c:104: error: parse error before "sample"
ad_libmad.c: In function `scale':
ad_libmad.c:106: error: `sample' undeclared (first use in this function)
ad_libmad.c:106: error: `MAD_F_FRACBITS' undeclared (first use in this function)ad_libmad.c:109: error: `MAD_F_ONE' undeclared (first use in this function)
ad_libmad.c: In function `decode_audio':
ad_libmad.c:130: error: `mad_fixed_t' undeclared (first use in this function)
ad_libmad.c:130: error: parse error before "const"
ad_libmad.c:134: error: dereferencing pointer to incomplete type
ad_libmad.c:135: error: dereferencing pointer to incomplete type
ad_libmad.c:136: error: `left_ch' undeclared (first use in this function)
ad_libmad.c:136: error: dereferencing pointer to incomplete type
ad_libmad.c:137: error: `right_ch' undeclared (first use in this function)
ad_libmad.c:137: error: dereferencing pointer to incomplete type
make[1]: *** [ad_libmad.o] Error 1
make[1]: Leaving directory `/root/mplayer/MPlayer-0.92.1/libmpcodecs'
make: *** [libmpcodecs/libmpcodecs.a] Error 2
用的是这个mplayer
MPlayer-0.92.1
./configure --cc=arm-linux-gcc --target=arm-armv4-linux --enable-static --prefix=/mplayer --disable-win32 --disable-dvdread --enable-fbdev --disable-mencoder --disable-live --enable-libavcodec --language=zh_CN --enable-mad
说mad.h
找不到!请专家看看!
在编译过程中出现这样的问题!
make -C libmpcodecs
make[1]: Entering directory `/root/mplayer/MPlayer-0.92.1/libmpcodecs'
arm-linux-gcc -c -O4 -pipe -ffast-math -fomit-frame-pointer -I. -Inative -I..
-I../libmpdemux -I../loader -D_GNU_SOURCE -o ad_libmad.o ad_libmad.c
ad_libmad.c:23:17: mad.h: No such file or directory
ad_libmad.c:27: error: field `synth' has incomplete type
ad_libmad.c:28: error: field `stream' has incomplete type
ad_libmad.c:29: error: field `frame' has incomplete type
ad_libmad.c: In function `read_frame':
ad_libmad.c:75: error: `MAD_ERROR_BUFLEN' undeclared (first use in this function)
ad_libmad.c:75: error: (Each undeclared identifier is reported only once
ad_libmad.c:75: error: for each function it appears in.)
ad_libmad.c: In function `init':
ad_libmad.c:88: error: `MAD_MODE_SINGLE_CHANNEL' undeclared (first use in this function)
ad_libmad.c: At top level:
ad_libmad.c:104: error: parse error before "sample"
ad_libmad.c: In function `scale':
ad_libmad.c:106: error: `sample' undeclared (first use in this function)
ad_libmad.c:106: error: `MAD_F_FRACBITS' undeclared (first use in this function)ad_libmad.c:109: error: `MAD_F_ONE' undeclared (first use in this function)
ad_libmad.c: In function `decode_audio':
ad_libmad.c:130: error: `mad_fixed_t' undeclared (first use in this function)
ad_libmad.c:130: error: parse error before "const"
ad_libmad.c:134: error: dereferencing pointer to incomplete type
ad_libmad.c:135: error: dereferencing pointer to incomplete type
ad_libmad.c:136: error: `left_ch' undeclared (first use in this function)
ad_libmad.c:136: error: dereferencing pointer to incomplete type
ad_libmad.c:137: error: `right_ch' undeclared (first use in this function)
ad_libmad.c:137: error: dereferencing pointer to incomplete type
make[1]: *** [ad_libmad.o] Error 1
make[1]: Leaving directory `/root/mplayer/MPlayer-0.92.1/libmpcodecs'
make: *** [libmpcodecs/libmpcodecs.a] Error 2
[root@localhost MPlayer-0.92.1]# make
make -C libmpcodecs
make[1]: Entering directory `/root/mplayer/MPlayer-0.92.1/libmpcodecs'
arm-linux-gcc -c -O4 -pipe -ffast-math -fomit-frame-pointer -I. -Inative -I..
-I../libmpdemux -I../loader -D_GNU_SOURCE -o ad_libmad.o ad_libmad.c
ad_libmad.c:23:17: mad.h: No such file or directory
ad_libmad.c:27: error: field `synth' has incomplete type
ad_libmad.c:28: error: field `stream' has incomplete type
ad_libmad.c:29: error: field `frame' has incomplete type
ad_libmad.c: In function `read_frame':
ad_libmad.c:75: error: `MAD_ERROR_BUFLEN' undeclared (first use in this function)
ad_libmad.c:75: error: (Each undeclared identifier is reported only once
ad_libmad.c:75: error: for each function it appears in.)
ad_libmad.c: In function `init':
ad_libmad.c:88: error: `MAD_MODE_SINGLE_CHANNEL' undeclared (first use in this function)
ad_libmad.c: At top level:
ad_libmad.c:104: error: parse error before "sample"
ad_libmad.c: In function `scale':
ad_libmad.c:106: error: `sample' undeclared (first use in this function)
ad_libmad.c:106: error: `MAD_F_FRACBITS' undeclared (first use in this function)ad_libmad.c:109: error: `MAD_F_ONE' undeclared (first use in this function)
ad_libmad.c: In function `decode_audio':
ad_libmad.c:130: error: `mad_fixed_t' undeclared (first use in this function)
ad_libmad.c:130: error: parse error before "const"
ad_libmad.c:134: error: dereferencing pointer to incomplete type
ad_libmad.c:135: error: dereferencing pointer to incomplete type
ad_libmad.c:136: error: `left_ch' undeclared (first use in this function)
ad_libmad.c:136: error: dereferencing pointer to incomplete type
ad_libmad.c:137: error: `right_ch' undeclared (first use in this function)
ad_libmad.c:137: error: dereferencing pointer to incomplete type
make[1]: *** [ad_libmad.o] Error 1
make[1]: Leaving directory `/root/mplayer/MPlayer-0.92.1/libmpcodecs'
make: *** [libmpcodecs/libmpcodecs.a] Error 2
用的是这个mplayer
MPlayer-0.92.1
./configure --cc=arm-linux-gcc --target=arm-armv4-linux --enable-static --prefix=/mplayer --disable-win32 --disable-dvdread --enable-fbdev --disable-mencoder --disable-live --enable-libavcodec --language=zh_CN --enable-mad
说mad.h
找不到!请专家看看!
|
下载libmad交叉编译, 将得到的静态库libmad.a放到arm linux toolchain的lib目录下, 如/usr/local/arm/3.4.1/lib
或直接在config.mak里指定MAD_LIB的目录
或直接在config.mak里指定MAD_LIB的目录