Incompatible Implicit Declaration of Built-In Function Warning Using NDK with LAME

前端 未结 1 1347
醉酒成梦
醉酒成梦 2021-01-13 20:54

I\'m trying to follow the tutorial located at the following location

http://developer.samsung.com/android/technical-docs/Porting-and-using-LAME-MP3-on-Android-with-J

相关标签:
1条回答
  • 2021-01-13 21:42

    After a lot of searching it looks like the answer I was looking for was found here

    Lame MP3 Encoder compile for Android

    The key for me was to ensure that the following line was added to my Android.mk file

    LOCAL_CFLAGS = -DSTDC_HEADERS
    

    as mentioned by James Zhang.

    I'm enclosing my complete makefile below this post so what I'm saying is perfectly clear.

    Contents of Updated Android.mk File

    LOCAL_PATH := $(call my-dir)
    
        include $(CLEAR_VARS)
    
        LOCAL_MODULE        := libmp3lame
        LOCAL_SRC_FILES     := \
        ./libmp3lame/bitstream.c \
        ./libmp3lame/encoder.c \
        ./libmp3lame/fft.c \
        ./libmp3lame/gain_analysis.c \
        ./libmp3lame/id3tag.c \
        ./libmp3lame/lame.c \
        ./libmp3lame/mpglib_interface.c \
        ./libmp3lame/newmdct.c \
        ./libmp3lame/presets.c \
        ./libmp3lame/psymodel.c \
        ./libmp3lame/quantize.c \
        ./libmp3lame/quantize_pvt.c \
        ./libmp3lame/reservoir.c \
        ./libmp3lame/set_get.c \
        ./libmp3lame/tables.c \
        ./libmp3lame/takehiro.c \
        ./libmp3lame/util.c \
        ./libmp3lame/vbrquantize.c \
        ./libmp3lame/VbrTag.c \
        ./libmp3lame/version.c 
    
        LOCAL_LDLIBS := -llog
        LOCAL_CFLAGS = -DSTDC_HEADERS
    
        include $(BUILD_SHARED_LIBRARY)
    
    0 讨论(0)
提交回复
热议问题