3

I had following error when done cross compilation for android.

Cross compiler used SDK/prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.7/bin/arm-linux-androideabi' 
./libgpsd.a(libgpsd_core.o):libgpsd_core.c:function gpsd_poll: error: undefined reference to '__isfinite'
./libgpsd.a(libgpsd_core.o):libgpsd_core.c:function gpsd_poll: error: undefined reference to '__isfinite'
./libgpsd.a(libgpsd_core.o):libgpsd_core.c:function gpsd_poll: error: undefined reference to '__isfinite'
./libgpsd.a(libgpsd_core.o):libgpsd_core.c:function gpsd_poll: error: undefined reference to '__isfinite'
Damian Kozlak
  • 7,065
  • 10
  • 45
  • 51

1 Answers1

2

The function infinite() is part of C99. Add LOCAL_CFLAGS += -std=c99 to your Android.mk. See question How to set standard c99 for compile android NDK project

Community
  • 1
  • 1
Rabbid76
  • 202,892
  • 27
  • 131
  • 174