Android NDK r10c build error for arm64-v8a: No such file or directory #include <sha1.h> -
I have a native C code, which calculates SHA1 digest, it is compiled without problems with NDK R10b But I get this error with NDK R10C:
[compiled compiled by: my library & lt; = My-library-jni.c {PATH_TO_THE_FILE} / my-library-jni .c: 3: 18: Fatal error: sha1.h: No such file or directory # is included & lt; Sha1.h & gt;
I am updating NDK R10 C to compile for 64-bit platform. It seems that the 64-bit header does not include sha1.h. Why? And how can I fix it? Can I get some implementation of SHA1 and include it in my project?
Edit
I ended up using the code. It worked fine for me.
I think you have NDK R10b in 64 bit mode because me sha1.h for arm64-v8a The header is not even found.
It seems that SHA1 was not explicitly supported - it was not mentioned anywhere in the document. And it is not mentioned in the "static API" documentation (and I think it can be technically not considered as part of the library). You also include MD5 functions in libc.so which link to 32 bit mode, which do not appear at all in the header, which makes everyone more unexpected / unplanned.
Even if it is not originally intended, they have kept it in 32-bit mode for compatibility, but in 64-bit mode, we have chosen the option to remove such unexpected stuff.
Make a link to clarify something:
Yes, your solution is to find an existing implementation of SHA1 (Fortunately many different available under different types of licenses - are different) and include it instead most of them are similar or nearly identical APIs.
Comments
Post a Comment