I am trying to use an open source C library in my Android project. This library uses the atof() function. I know that atof() is a function defined in the standard C library (stdlib.h). Therefore, it should be implemented in standard C library on the Android NDK (bionic library).

But, when I try to load a library that contains calls to this function, I receive a runtime error:

java.lang.UnsatisfiedLinkError: Cannot load library: reloc_library[1285]:    86 cannot locate 'atof'....

I am a beginner in Android development using the NDK, so maybe I just missed something like flags, compiler directives, etc.

My android.mk file is:

LOCAL_PATH := $(call my-dir)

include $(CLEAR_VARS)

LOCAL_ALLOW_UNDEFINED_SYMBOLS := true

LS_CPP=$(subst $(1)/,,$(wildcard $(1)/$(2)/*.c))


LOCAL_MODULE := libA

LOCAL_SHARED_LIBRARIES :=       \
                            libgmodule-2.0          \
                            libgobject-2.0          \
                            libgthread-2.0          \
                            libglib-2.0

LOCAL_SRC_FILES:= sourceFile.c



include $(BUILD_SHARED_LIBRARY
Edit
Report