protobuf icon indicating copy to clipboard operation
protobuf copied to clipboard

undefined reference to 'strtof' error from protobuf lib when using minSdkVersion 19.

Open naahmedea opened this issue 3 years ago • 3 comments

Description When I use minSdkVersion 19 compile my project, and in the link step, I got this error: protobuf/android/armeabi-v7a/libProtobuf.a(strutil.cc.o):strutil.cc:function protobuf::safe_strtof(char const*, float*): error: undefined reference to 'strtof' But I change my minSdkVersion to 21, the error disappear. My APP must support API 19, Do we have some workaround to solve this problem?

Environment Details NDK Version: 19, 21 ( I have tried some version, got the same error) Build system: cmake ABI: armeabi-v7a STL: c++static

naahmedea avatar Oct 17 '22 08:10 naahmedea

This looks like a duplicate of https://github.com/android/ndk/issues/770. Do any of those solutions work for you?

mkruskal-google avatar Oct 19 '22 16:10 mkruskal-google

No, didn't work :(

naahmedea avatar Oct 19 '22 16:10 naahmedea

What did you try? It looks like the issue there was the toolchain being used. Another option was if including cstdlib in our strutil.cc file fixes your issue? If it does I have no problem adding it, but I'd need verification it worked

mkruskal-google avatar Oct 19 '22 17:10 mkruskal-google

We triage inactive PRs and issues in order to make it easier to find active work. If this issue should remain active or becomes active again, please add a comment.

This issue is labeled inactive because the last activity was over 90 days ago.

github-actions[bot] avatar Jan 01 '24 10:01 github-actions[bot]

We triage inactive PRs and issues in order to make it easier to find active work. If this issue should remain active or becomes active again, please reopen it.

This issue was closed and archived because there has been no new activity in the 14 days since the inactive label was added.

github-actions[bot] avatar Jan 16 '24 10:01 github-actions[bot]