Android NDK - ошибка при создании sqlite с поддержкой ICU - PullRequest
3 голосов
/ 13 января 2012

Я пытаюсь построить sqlite с поддержкой ICU на Android NDK, в моем Android.mk у меня есть следующее:

SQLITE3_INCLUDE_DIRS := -I/home_folder/dev/platform_external_icu4c/common -I/home_folder/dev/platform_external_icu4c/i18n

Но когда я пытаюсь скомпилировать, я получаю кучу undefined reference ошибок:


./obj/local/armeabi/objs/sqlite3_jni/sqlite3secure.o: In function `icuNext':
/home_folder/workspace/ndk-sqlite/jni/sqlite3.c:125631: undefined reference to `ubrk_current_46'
/home_folder/workspace/ndk-sqlite/jni/sqlite3.c:125632: undefined reference to `ubrk_next_46'
/home_folder/workspace/ndk-sqlite/jni/sqlite3.c:125640: undefined reference to `u_isspace_46'
/home_folder/workspace/ndk-sqlite/jni/sqlite3.c:125640: undefined reference to `u_isspace_46'
/home_folder/workspace/ndk-sqlite/jni/sqlite3.c:125660: undefined reference to `u_strToUTF8_46'
/home_folder/workspace/ndk-sqlite/jni/sqlite3.c:125639: undefined reference to `utf8_nextCharSafeBody_46'
./obj/local/armeabi/objs/sqlite3_jni/sqlite3secure.o: In function `icuClose':
/home_folder/workspace/ndk-sqlite/jni/sqlite3.c:125605: undefined reference to `ubrk_close_46'
./obj/local/armeabi/objs/sqlite3_jni/sqlite3secure.o: In function `icuLikeCompare':
/home_folder/workspace/ndk-sqlite/jni/sqlite3.c:125075: undefined reference to `u_foldCase_46'
/home_folder/workspace/ndk-sqlite/jni/sqlite3.c:125076: undefined reference to `u_foldCase_46'
/home_folder/workspace/ndk-sqlite/jni/sqlite3.c:125052: undefined reference to `utf8_countTrailBytes_46'
./obj/local/armeabi/objs/sqlite3_jni/sqlite3secure.o: In function `icuOpen':
/home_folder/workspace/ndk-sqlite/jni/sqlite3.c:125573: undefined reference to `u_foldCase_46'
/home_folder/workspace/ndk-sqlite/jni/sqlite3.c:125588: undefined reference to `ubrk_open_46'
/home_folder/workspace/ndk-sqlite/jni/sqlite3.c:125582: undefined reference to `utf8_nextCharSafeBody_46'
/home_folder/workspace/ndk-sqlite/jni/sqlite3.c:125595: undefined reference to `ubrk_first_46'
/home_folder/workspace/ndk-sqlite/jni/sqlite3.c:125570: undefined reference to `utf8_nextCharSafeBody_46'
./obj/local/armeabi/objs/sqlite3_jni/sqlite3secure.o: In function `icuLikeFunc':
/home_folder/workspace/ndk-sqlite/jni/sqlite3.c:125126: undefined reference to `utf8_nextCharSafeBody_46'
./obj/local/armeabi/objs/sqlite3_jni/sqlite3secure.o: In function `icuCollationDel':
/home_folder/workspace/ndk-sqlite/jni/sqlite3.c:125312: undefined reference to `ucol_close_46'
./obj/local/armeabi/objs/sqlite3_jni/sqlite3secure.o: In function `icuFunctionError':
/home_folder/workspace/ndk-sqlite/jni/sqlite3.c:125152: undefined reference to `u_errorName_46'
./obj/local/armeabi/objs/sqlite3_jni/sqlite3secure.o: In function `icuLoadCollation':
/home_folder/workspace/ndk-sqlite/jni/sqlite3.c:125371: undefined reference to `ucol_open_46'
/home_folder/workspace/ndk-sqlite/jni/sqlite3.c:125382: undefined reference to `ucol_close_46'
./obj/local/armeabi/objs/sqlite3_jni/sqlite3secure.o: In function `icuCollationColl':
/home_folder/workspace/ndk-sqlite/jni/sqlite3.c:125328: undefined reference to `ucol_strcoll_46'
./obj/local/armeabi/objs/sqlite3_jni/sqlite3secure.o: In function `icuCaseFunc16':
/home_folder/workspace/ndk-sqlite/jni/sqlite3.c:125293: undefined reference to `u_strToUpper_46'
/home_folder/workspace/ndk-sqlite/jni/sqlite3.c:125295: undefined reference to `u_strToLower_46'
./obj/local/armeabi/objs/sqlite3_jni/sqlite3secure.o: In function `icuRegexpFunc':
/home_folder/workspace/ndk-sqlite/jni/sqlite3.c:125216: undefined reference to `uregex_setText_46'
/home_folder/workspace/ndk-sqlite/jni/sqlite3.c:125223: undefined reference to `uregex_matches_46'
/home_folder/workspace/ndk-sqlite/jni/sqlite3.c:125234: undefined reference to `uregex_setText_46'
/home_folder/workspace/ndk-sqlite/jni/sqlite3.c:125204: undefined reference to `uregex_open_46'
./obj/local/armeabi/objs/sqlite3_jni/sqlite3secure.o: In function `icuRegexpDelete':
/home_folder/workspace/ndk-sqlite/jni/sqlite3.c:125163: undefined reference to `uregex_close_46'


1 Ответ

2 голосов
/ 13 января 2012

Вы публикуете каталоги, включающие в себя посты, но ссылаетесь ли вы в реальных файлах ICU lib (.a), таких как libicuuc.a?Они должны быть указаны в вашем Application.mk через APP_MODULES, если у вас есть .mk для ICU или напрямую через LOCAL_STATIC_LIBRARIES (или даже напрямую через LOCAL_LDFLAGS).

Первый метод APP_MODULES предпочтителен.

...