Android ndk can't find atof function

后端 未结 2 674
我寻月下人不归
我寻月下人不归 2020-12-10 15:05

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

2条回答
  •  -上瘾入骨i
    2020-12-10 15:44

    From stdlib.h in the Android source;

    static __inline__ double atof(const char *nptr)
    {
        return (strtod(nptr, NULL));
    }
    

    atof is in other words not a library function, it's an inline function that calls strtod.

    If you need to call through loading a library, just use strtod instead.

提交回复
热议问题