Compiling ICU for Android - 'uint64_t' does not name a type

后端 未结 5 909
伪装坚强ぢ
伪装坚强ぢ 2021-01-13 12:54

While attempting to cross-compile ICU using android-ndk-r7 in Linux, the following error occurs after configuration when I run \'make\'

__/android-ndk-r7/pla         


        
5条回答
  •  南笙
    南笙 (楼主)
    2021-01-13 13:02

    -D__STDC_INT64__ allows uint64_t and int64_t to be defined in Android's stdint.h.

    However, this is not the ideal fix. The error has to do with Android, stdint and -std=c++0x. See What's the difference in GCC between -std=gnu++0x and -std=c++0x and which one should be used? for further information. If you follow the train of thought, an alternate (better??) fix is to modify the icu configuration script so that it calls for gnu++0x instead of c++0x. That's probably the right thing to do.

    *** 7238,7244 ****
              OLD_CFLAGS="${CFLAGS}"
              OLD_CXXFLAGS="${CXXFLAGS}"
              CFLAGS="${CFLAGS} -std=gnu99 -D_GCC_"
    !         CXXFLAGS="${CXXFLAGS} -std=c++0x"
              cat confdefs.h - <<_ACEOF >conftest.$ac_ext
      /* end confdefs.h.  */
    
    --- 7241,7247 ----
              OLD_CFLAGS="${CFLAGS}"
              OLD_CXXFLAGS="${CXXFLAGS}"
              CFLAGS="${CFLAGS} -std=gnu99 -D_GCC_"
    !         CXXFLAGS="${CXXFLAGS} -std=gnu++0x"
              cat confdefs.h - <<_ACEOF >conftest.$ac_ext
      /* end confdefs.h.  */
    
    ***************
    

提交回复
热议问题