-
-
Notifications
You must be signed in to change notification settings - Fork 290
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
quad_t doesn't exist in ndk #227
Comments
Cool, I never realized anyone would do that :D
I'm sure you could fall back to some other data type where quad_t is unavailable /cc @takeoverjp Your errors also suggest |
index** and rindex are part of strings.h header. Perhaps, android does not provide those functions at all, or provide something similar with another name. |
index and rindex aren't present in ndk strings.h header (or anywhere else in include) so they'll need created. Adding: |
Hmm, you didn't need to provide an implementation? That's slightly scary :)
Perhaps you can use some |
Not sure, might be easier to write a function with other name, and use it. And, would be nice to add ci to make this types of builds to make sure that a commit will works for different systems. |
Update on this issue. Haven't found a fix for quad_t other than removing the garbage collecting stuff altogether. However, found that just defining index like I did didn't work. What I did find was that android ndk, while not having index or rindex, does have strchr and strrchr so just replacing them accordingly was all I needed there. Could you do the same since index is legacy? NDK doesn't have strings.h but newer string.h
|
When cross-compiling for android using android ndk, quad_t isn't defined so errors out on me. v0.8.6 worked fine (pre quad-t addition). Is there any other way to do this so it'll be compatible with android ndk? Or am I stuck at this point?
cui.cpp:160:9: error: use of undeclared identifier 'index' if (index(progname, FILE_SEPARATOR) != NULL) { ^ cui.cpp:161:18: error: use of undeclared identifier 'rindex' progname = rindex(progname, FILE_SEPARATOR) + 1; ^ inode2prog.cpp:229:8: error: unknown type name 'quad_t'; did you mean 'uid_t'? static quad_t get_ms() { ^~~~~~ uid_t /home/zack/build_script/android-ndk-r23c/toolchains/llvm/prebuilt/linux-x86_64/bin/../sysroot/usr/include/sys/types.h:45:17: note: 'uid_t' declared here typedef __uid_t uid_t; ^ inode2prog.cpp:232:22: error: unknown type name 'quad_t'; did you mean 'uid_t'? return static_cast<quad_t>(ts.tv_sec) * 1000 + ts.tv_nsec / 1000000; ^~~~~~ uid_t /home/zack/build_script/android-ndk-r23c/toolchains/llvm/prebuilt/linux-x86_64/bin/../sysroot/usr/include/sys/types.h:45:17: note: 'uid_t' declared here typedef __uid_t uid_t; ^ 2 errors generated. make[1]: *** [MakeApp.mk:54: cui.o] Error 1 make[1]: *** Waiting for unfinished jobs.... inode2prog.cpp:256:10: error: unknown type name 'quad_t'; did you mean 'uid_t'? static quad_t last_ms = 0; ^~~~~~ uid_t /home/zack/build_script/android-ndk-r23c/toolchains/llvm/prebuilt/linux-x86_64/bin/../sysroot/usr/include/sys/types.h:45:17: note: 'uid_t' declared here typedef __uid_t uid_t; ^ inode2prog.cpp:257:3: error: unknown type name 'quad_t'; did you mean 'uid_t'? quad_t start_ms = 0; ^~~~~~ uid_t /home/zack/build_script/android-ndk-r23c/toolchains/llvm/prebuilt/linux-x86_64/bin/../sysroot/usr/include/sys/types.h:45:17: note: 'uid_t' declared here typedef __uid_t uid_t; ^ 4 errors generated.
The text was updated successfully, but these errors were encountered: