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

后端 未结 5 903
伪装坚强ぢ
伪装坚强ぢ 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 12:54

    The main issue is that uint64_t isn't a defined type in C versions prior to C99. The best way to have it defined is to tell gcc which standard you'd like to use.

    For c++, that's passing the -std=gnu++0x flag. For C, that's passing -std=c99

    I.e. add a line something like

    APP_CPPFLAGS= -std=gnu++0x
    

    to your Application.mk file.

    Alternatively, you can just hack it via your #define; I just wouldn't distribute code with such a hack as it's fragile.

提交回复
热议问题