SQLite User Forum

NDK compiling issue with -DSQLITE_ENABLE_ICU
Login

NDK compiling issue with -DSQLITE_ENABLE_ICU

(1.1) Originally by anonymous with edits by Richard Hipp (drh) on 2020-04-02 07:52:35 from 1.0 [source]

I have added given below line in Android.mk
LOCAL_CFLAGS += -DSQLITE_ENABLE_ICU

but getting following exception:
[arm64-v8a] Compile        : sqliteX <= sqlite3.c
jni/sqlite/sqlite3.c:192400:10: fatal error: 'unicode/utypes.h' file not found
#include <unicode/utypes.h>

Try to search 'unicode/utypes.h' but did not find it. I have downloaded Version_3_31_0 SQLite_Android_Bindings.zip

Much appreciate any help.

(2) By Dan Kennedy (dan) on 2020-04-02 10:12:34 in reply to 1.1 [link] [source]

One way to go would be to build ICU yourself and install it into the toolchain sysroot. Then bundle the library files for it in your app along with the other components built by the NDK.

http://site.icu-project.org/home

Googling for "android ndk icu" returns a bunch of links. It doesn't look trivial, but not impossible either.

(3.1) Originally by anonymous with edits by Richard Hipp (drh) on 2020-04-02 15:00:59 from 3.0 in reply to 2 [link] [source]

Thank you Dan for prompt reply,
I am trying to enable ICU extension for SQLite. Using Version_3_31_0 of
SQLite_Android_Bindings. I am  new to this world and trying to figure
out how to compile SQLite with ICU. What i understood from your suggestion
is sound like enabling ICU support in Android App. My intention is to
use upper() or lower() method inside query.

(4) By Gabriele (aeroxr1) on 2023-06-20 13:52:56 in reply to 3.1 [link] [source]

I wanted to ask if you were able to solve this problem? I'm struggling with it and would appreciate any guidance you can provide.