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

Latest master does not build for Android #907

Open
leetal opened this issue Oct 11, 2018 · 5 comments
Open

Latest master does not build for Android #907

leetal opened this issue Oct 11, 2018 · 5 comments
Assignees

Comments

@leetal
Copy link
Contributor

leetal commented Oct 11, 2018

Android builds does not work (with Clang++) on the current master due to missing definition of abort_if_no_jvm().

https://github.com/Microsoft/cpprestsdk/blob/b9dd8eab814892f110853be1098df1b3f77b2ff0/Release/src/pplx/threadpool.cpp#L41

Problem is due to the fact that abort_if_no_jvm() is declared in an anonymous namespace and has no prior declarations before get_jvm_env() uses it.

Solution is to just move the definition of abort_if_no_jvm() above get_jvm_env().

@BillyONeal
Copy link
Member

Yeah, this one's my fault. That's what we get for having no continuous integration coverage for Android :(. Attempting to address that now....

@BillyONeal BillyONeal self-assigned this Oct 17, 2018
@BillyONeal
Copy link
Member

Fixed in 328646a

@McMagnus
Copy link

Compiles, but doesn't link for Android.

commit 7467b79 broke it for me (using the embedded websocketpp). I need to add the crossplat namespace to use it.

@BillyONeal
Copy link
Member

@McMagnus That suggests you are linking with an old build? That variable is not declared in a crossplat:: namespace: https://github.com/Microsoft/cpprestsdk/blob/7467b79307e112ed130be54b28a587674365c66d/Release/src/pplx/threadpool.cpp#L26

@McMagnus
Copy link

McMagnus commented Mar 5, 2019

Yes it is. It is declared in the crossplat namespace in threadpool.h, and also accessed in that namespace from websockets/client/ws_client_wspp.cpp.

The file you pointed out shows that it isn't implemented in that namespace. All this means that it will compile ok but not link.

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

3 participants