[FFmpeg-user] compiling for android
Patrick Shirkey
pshirkey at boosthardware.com
Wed Jul 9 17:26:00 CEST 2014
On Thu, July 10, 2014 12:44 am, Nicolas George wrote:
> Le primidi 21 messidor, an CCXXII, Patrick Shirkey a écrit :
>> Unfortunately all these flags not working for me. Does that suggest a
>> problem (in this case) with the compiler or ffmpeg?
>
> You can try to compile the following simple code:
>
> #include <math.h>
>
> double test(double x)
> {
> return cos(x) + sin(x);
> }
>
> If the compiler from the Android NDK issues code using sincos, then it is
> broken, since the platform does not provide it.
>
I found that I can compile without errors if I use the following commandline:
/4.4prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.7/bin/arm-linux-androideabi-gcc
--sysroot=/4.4/prebuilts/ndk/current/platforms/android-18/arch-arm -lm
testlm.c
testlm.c is the following:
#include <math.h>
int main(void)
{
double a, b, c;
return cos(a) + sin(a);
}
- However if I use Carl's test for sincos I see the following:
#define _GNU_SOURCE 1
#include <math.h>
int main(void)
{
double a, b, c;
sincos(a, &b, &c);
return b*c;
}
/tmp/ccIGXQay.o:testlm.c:function main: error: undefined reference to
'sincos'
collect2: error: ld returned 1 exit status
/4.4prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.7/bin/arm-linux-androideabi-gcc
--sysroot=/4.4/prebuilts/ndk/current/platforms/android-18/arch-arm -lm
testlm.c
I have also tried with these combinations with the same error:
-fno-builtin-sincos
-fno-builtin-sin -fno-builtin-cos
-fno-builtin-sin -fno-builtin-cos -fno-builtin-sincos
--
Patrick Shirkey
Boost Hardware Ltd
More information about the ffmpeg-user
mailing list