![]() PREBUILT=$ANDROID_NDK/toolchains/x86-4.6/prebuilt/linux-x86_64 The build script for libogg is as follows:Įxport ANDROID_NDK=/home/lym/android-ndk-r9d ![]() Speex needs the libogg library, so download the libogg file too. In this article we will tell you how to write a cross-compiling script step by step.įirst, visit and to download the source files. Thus, cross-compiling on a Linux system is a better choice. It’s better if you write the build script yourself, which is not easy for most developers. We don’t think this is the best solution for building speex libraries. To build an x86 library, you must add “-DFLOATING_POINT=1 -D_USE_SSE -D_USE_SSE2”. Please read for more detail ( This blog is in Chinese, but can be easily read using Google Translator). Most developers use the NDK to build speex. Speex is a free speech codec, widely used in VoIP and sound recorder applications. #endif /* HAVE_SSE2_INLINE */ Speex Compiling S- >apply_window_float = apply_window_mp3 Change mpegaudiodsp.c and delete these lines of code: Note! A compiling error occurs on old FFmpeg versions when yasm is enabled. You must install yasm on your Linux system. Link these libraries to your project as a prelink static library to get a FFmpeg dynamic library.įor the best performance, use “enable-asm” and “enable-yasm”. OPTIMIZE_CFLAGS= " -march=atom -ffast-math -msse3 -mfpmath=sse"Īfter running this script, you will get libavcode.a, libavformat.a, libavutil.a, libswresample.a, and libswscale.a files. disable-ffplay -disable-avfilter -disable-avdevice -disable-ffprobe extra-ldflags= " -Wl,-rpath-link=$PLATFORM/usr/lib -L$PLATFORM/usr/lib -nostdlib -lc -lm" extra-cflags= " -O3 -fpic -DANDROID -DHAVE_SYS_UIO_H=1 -fasm -Wno-psabi -fno-short-enums -fno-strict-aliasing -finline-limit=300 $OPTIMIZE_CFLAGS " cross-prefix=$PREBUILT/bin/i686-android-linux. PLATFORM=$NDK/platforms/android-14/arch-x86 I am in no way experienced with compiling things, but i did manage to compile a simple helloworld.c program for my phone and run it successfully on the phone, which tells me the compiler works okay.Ĭan anyone give me more information on what's happening? Google returns almost nothing on any of these errors, especially the oslib.c errors.NDK=$ANDROID_NDK_ROOT # your ndk root path Makefile:643: recipe for target 'lib/sh/libsh.a' failed Make: Leaving directory '/home/earth/project/bash-4.3/lib/sh' Makefile:78: recipe for target 'oslib.o' failed Oslib.c:240:10: error: argument 'mode' doesn't match prototype home/earth/android-ndk-gcc/bin/./sysroot/usr/include/sys/stat.h:129:23: error: prototype declaration Oslib.c:239:12: error: argument 'path' doesn't match prototype home/earth/android-ndk-gcc/bin/./sysroot/usr/include/sys/stat.h:129:23: note: previous definition of 'mkfifo' was here Oslib.c:238:1: error: redefinition of 'mkfifo' I././lib/intl -I/home/earth/project/bash-4.3/lib/intl -DHAVE_CONFIG_H -DSHELL -g -O2 oslib.c home/earth/android-ndk-gcc/bin/arm-linux-androideabi-gcc -c -I.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |