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
Fix android libc++ build #7174
Fix android libc++ build #7174
Conversation
@mshabunin, could you please review it? |
@guycook What Android NDK do you use? |
@alalek I've tested and got it working with two separate ndk versions:
To use the built library I'm using Android Studio + gradle-experimental:0.8.0-beta2 and a build script that looks like:
The relevant cmake flags are:
|
@@ -40,6 +40,7 @@ | |||
#include "common.hpp" | |||
|
|||
#include <vector> | |||
#include <cstdlib> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This statement should be moved to "comon.hpp", because some other source files in Carotene need it too (e.g. canny.cpp).
Thank you! Please squash both commits into one and we will merge it. |
2432a0d
to
e06a9e9
Compare
@mshabunin Cool, I think that's done now (I haven't ever squashed before) |
👍 |
resolves #6511
This pullrequest changes
Presently, when using
cmake -DANDROID_STL=c++_shared
the build completes successfully but you can't actually use the generated artefacts in an android project that uses clang + libc++ due to linker errors. The changes in this PR resolve that by using the correct std library headers.