Android NDK编译lame问题汇总

LAME is a high quality MPEG Audio Layer III (MP3) encoder

Lame:http://lame.sourceforge.net/

ieee754_float32_t 问题

1
2
3
lame-3.100/libmp3lame/util.h:570:12: error: unknown type name 'ieee754_float32_t'
extern ieee754_float32_t fast_log2(ieee754_float32_t x);
^

util.h中570行将 extern ieee754_float32_t fast_log2(ieee754_float32_t x); 改为 extern float fast_log2(float x); 因为Android下并不支持该类型

1
2
//extern ieee754_float32_t fast_log2(ieee754_float32_t x);
extern float fast_log2(float x);

undefined reference to ‘index’ 问题

1
2
lame-3.100/libmp3lame/bitstream.c:141: error: undefined reference to 'bcopy'
lame-3.100/libmp3lame/id3tag.c:1205: error: undefined reference to 'index'

参考:https://stackoverflow.com/questions/27893149/android-ndk-for-x86-64-has-no-reference-for-bcopy-and-index

在Android.mk中添加

1
APP_CFLAGS += -DSTDC_HEADERS

Powered by AppBlog.CN     浙ICP备14037229号

Copyright © 2012 - 2020 APP开发技术博客 All Rights Reserved.

访客数 : | 访问量 :