作者在編譯extra_libs的ffmpeg部分時遇到了編譯錯誤,目前還未成功編譯(暫時擱置了)。
1 首先編譯gpac外部依賴庫
Get extra_libs source code from here. Then, goto /build/android and run the script:
./gpac_build_all_extra_libs <Android_NDK_DIR>
ps:<Android_NDK_DIR>指的是ndk的路徑
報錯1:
arm-linux-androideabi-4.9prebuiltwindows-x86_64/bin/arm-linux-androideabi-gcc is unable to create an executable file.
C compiler test failed.
If you think configure made a mistake, make sure you are using the latest
version from Git. If the latest version fails, report the problem to the
ffmpeg-user@ffmpeg.org mailing list or IRC #ffmpeg on irc.freenode.net.
Include the log file "config.log" produced by configure as this will help
solve the problem.
解決1:
compile_ffmpeg_android.sh中增加export TMPDIR=D:/cgywin/tmp
報錯2:
cannot open crtbegin_dynamic.o: No such file or directory
cannot open crtend_android.o: No such file or directory
error: cannot find -lc
error: cannot find -ldl
解決2:
將android-ndk-r10e\platforms\android-9\arch-arm\usr\lib下的所有文件copy到android-ndk-r10e\toolchains\arm-linux-androideabi-4.9\prebuilt\windows-x86_64\lib\gcc\arm-linux-androideabi\4.9下
如果編譯成功后將extra_libs放入gpac的extra_lib目錄下。
2 編譯gpac
執(zhí)行configure,然后make,最后應(yīng)該是在bin目錄下生成編譯好的.a。