Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

glog can't be compiled using Android NDK r16 #306

Closed
daquexian opened this issue Apr 9, 2018 · 5 comments
Closed

glog can't be compiled using Android NDK r16 #306

daquexian opened this issue Apr 9, 2018 · 5 comments

Comments

@daquexian
Copy link

daquexian commented Apr 9, 2018

When glog is built by Android NDK r15 or r14, there will be an error undefined reference to 'stderr'(like this issue) when glog is built as static library and linked to other programs. Please refer to this document. As shown in above document, this error can be avoided by adding a specific flag. But in Android NDK r16 there is no such flag. So glog can't be built by NDK r16.

Are there any ways to solve it?

@daquexian
Copy link
Author

Adding -DANDROID_PLATFORM="android-21" solves it.

@knsong
Copy link

knsong commented Apr 23, 2019

@daquexian Do you know why there is no glog output in logcat of android studio when debugging native code?

@daquexian
Copy link
Author

@knsong glog print logs to stdout or a log file instead of android logcat. For android logcat support you can try https://github.com/tzutalin/miniglog

@knsong
Copy link

knsong commented Apr 23, 2019

@daquexian thanks!

@sergiud sergiud closed this as completed Mar 30, 2021
@sergiud sergiud mentioned this issue May 6, 2021
@designerMichael
Copy link

[Adding -DANDROID_PLATFORM="android-21" solves it.]
I also meet this problem, but it work by Adding
-DANDROID_PLATFORM="android-23" to solve the undefined "stderr" problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants