-
Notifications
You must be signed in to change notification settings - Fork 2.2k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Unable to use GLM 0.9.6 with Android NDK #284
Comments
This issue should be fixed GLM 0.9.6 branch for 0.9.6.1 release but your confirmation would be helpful. Thanks for contributing, |
Sadly, the problem is always here :/
In the else state:
Edit: So, GLM_HAS_CXX11_STL is false |
GLM_HAS_CXX11_STL is supposed to be false actually. If the C++11 STL was supported, then the functions you mentioned should be available. I am going to modify the changes so that it only excludes Android as it seems to be specific to that platform. GCC 4.8.1 has not issue with this on Windows. Thanks, |
I'm sorry but the error is still here :s. I've tried to switch to the previous version (0.9.5.4) and everything work fine. I don't know if that can help, but I'm using Android NDK R10D (same result with R10C) and his default toolchain, I've tried with custom toolchain too: same errors. |
What the value of GLM_HAS_CXX11_STL? It should be false. Also, are you sure you are using GCC? |
First partI'm using Android's default toolchain so yes, but to be sure I've tried to do that: (with CMake)
Output print "gcc". I've added a condition to show GLM_HAS_CXX11_STL's value too:
Compilation continue so GLM_HAS_CXX11_STL is false. Second partSo, I've tried with Android NDK sample "native-activity", here are the results with the line "std::cout << "acosh(0.5) = " << std::acosh(0.5) << '\n';": GCC 4.9/gnustl_static AND GCC 4.9/stlport_static:
Clang/gnustl_static AND Clang/stlport_static:
c++_static (NDK error):
|
Regarding the second part, when GLM_HAS_CXX11_STL GLM is not using std::acosh, std::round, etc. If you look at glm/detail/func_common.inl:229:16, you will see that using ::std::round; is called only if GLM_HAS_CXX11_STL is true. |
Oh yes indeed! The program don't go in the condition, so GLM_HAS_CXX11_STL is ok. Look like the problem is not from here but from the condition:
May be the condition should use "GLM_HAS_CXX11_STL"? Files with the problem:
|
Ah ok, so the errors were different. Yes, I think the issue is here, I'll fix it. |
I have committed the changes so hopefully thinks will be better this time around. Thanks, |
Everything works fine now! Thanks a lot, |
Awesome and welcome! |
Sorry to say that, but the problem is back with the last version (GLM 0.9.6.2) :/ Edit: "func_exponential.inl:43:14: error: 'std::log2' has not been declared using std::log2;" |
Ahhh, I think I understand the issue...
Damn! Fixed with #if GLM_PLATFORM == GLM_PLATFORM_ANDROID |
Indeed! Everything is ok now :D. Thanks! |
FWIW, I found a stackoverflow post that sheds some light on the android / C++11 STL math library problem: |
Problem reoccurs in 0.9.7.3. There is no "GLM_PLATFORM_ANDROID" check in the file "setup.hpp" anymore. Was the patch intentionally removed from later versions? |
I'm updating GLM from 0.9.5.4 to 0.9.6.0 and something is wrong during the Android NDK compilation: I've got errors with std functions not founds:
Same error with "std::round", "std::asinh", "std::atanh", "std::acosh", …. Everything was working well before the last update. (I'm using gcc 4.9 and compile with --std=c++11)
Thanks!
The text was updated successfully, but these errors were encountered: