I’m trying to use the clock function in c++ code. I include time.h, and this doesn’t produce any error, but trying to use clock() or clock_gettime() produces this error when building for Android. This should be part of the NDK, does anybody know why it is failing?
Does this occur in other versions as well, or is it only occurring in the Master branch? If you have not tested, please give that a shot and let me know.
NDK version is 11c, and I have NDK API level set to ‘android-19’ In the project settings.
I’m not really on the master branch, I’m in a modified 4.12 branch in a fork of the engine from the start of June, (the github master branch seemed like the closest option I could pick) and, because of some things I’ve added, I won’t be able to compile if I switch branches.
Is it possible that it’s including the (quite bare) “time.h” found in ‘android-ndk-r11c\sources\android\support\include’ and ignoring the ones in ‘android-ndk-r11c\platforms’ ?
It does work if I specify the full path of time.h I want.
but both the time.h in platforms and the one in support are directly below their respective include folders, so I don’t know if I can specify one or the other without using a full path
I found the cause of the trouble after some searching; I had a ‘time.h’ inside of my project’s Thirdparty, which I didn’t realize, and it didn’t have “#include_next time.h” in it. Sorry for the trouble