Похоже, что в этой проблеме участвуют два файла. icu / source / common / unicode / ptypes.h, который вызывает sys / types.h, включает
#if ! U_HAVE_UINT64_T
typedef unsigned long long uint64_t;
/* else we may not have a 64-bit type */
#endif
Включая sys / types.h из Android, мы задействуем (около строки 122/124)
#ifdef __BSD_VISIBLE
typedef unsigned char u_char;
typedef unsigned short u_short;
typedef unsigned int u_int;
typedef unsigned long u_long;
typedef uint32_t u_int32_t;
typedef uint16_t u_int16_t;
typedef uint8_t u_int8_t;
typedef uint64_t u_int64_t;
#endif
Кажется, что uint64_t не был объявлен, когда он назначен на u_int64_t. Действительно, sys / types.h включает в себя stdint.h, который имеет следующее:
#if !defined __STRICT_ANSI__ || __STDC_VERSION__ >= 199901L
# define __STDC_INT64__
#endif
typedef __int8_t int8_t;
typedef __uint8_t uint8_t;
typedef __int16_t int16_t;
typedef __uint16_t uint16_t;
typedef __int32_t int32_t;
typedef __uint32_t uint32_t;
#if defined(__STDC_INT64__)
typedef __int64_t int64_t;
typedef __uint64_t uint64_t;
#endif
Вероятно STRICT_ANSI не определено. Похоже, это ошибка в коде Android в sys / types.h. Если STDC_INT64 не определен, он не будет определять uint64_t, поэтому он не может определить u_int64_t. Возможно, реальное решение состоит в том, чтобы изменить sys / types.h так, чтобы он имел
#ifdef __BSD_VISIBLE
typedef unsigned char u_char;
typedef unsigned short u_short;
typedef unsigned int u_int;
typedef unsigned long u_long;
typedef uint32_t u_int32_t;
typedef uint16_t u_int16_t;
typedef uint8_t u_int8_t;
$if defined(__STDC_INT64__)
typedef uint64_t u_int64_t;
#endif
#endif
Если вы исправите это, следующая ошибка будет в cstring.h: 109
icu/source/common/cstring.h:109: error: 'int64_t' has not been declared
Если вместо этого вы будете использовать #define STDC_INT64 в файле common / unicode / ptypes.h, он будет значительно дальше, но закончится на
icu/source/common/ustrenum.cpp:118: error: must #include <typeinfo> before using typeid
с дополнительной информацией здесь: http://groups.google.com/group/android-ndk/browse_thread/thread/2ec9dc289d815ba3?pli=1, но без реальных решений