Issue
I try compile c++ lib in Android Studio with NDK and get some errors:
C:\AndroidSDK\ndk-bundle\toolchains\llvm\prebuilt\windows-x86_64\bin\..\lib64\clang\3.8.275480\include\stddef.h:62:23: error: typedef redefinition with different types ('unsigned long' vs 'unsigned int') typedef __SIZE_TYPE__ size_t; ^../../../../src/main/cpp/include\Crypto/Core/Types.h:20:22: note: previous definition is here typedef unsigned int size_t;
When I define
typedef unsigned long size_t;
I get:
C:\AndroidSDK\ndk-bundle\toolchains\llvm\prebuilt\windows-x86_64\bin\..\lib64\clang\3.8.275480\include\stddef.h:62:23: error: typedef redefinition with different types ('unsigned int' vs 'unsigned long') typedef __SIZE_TYPE__ size_t;^ ../../../../src/main/cpp/include\Crypto/Core/Types.h:20:23: note: previous definition is here typedef unsigned long size_t;
How can I fix it?
Solution
size_t
is already a data type defined by several C/C++ standards.
Try to typedef something else that is not already defined in language.
Example:-
typedef unsigned long my_size_t;
Answered By - foobar
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.