Hi,
I'm trying to get the sqlite android bindings (
https://www.sqlite.org/android/doc/trunk/www/index.wiki) building in BUCK.
I've put a simple BUCK file in the same directory as the Android.mk and Application.mk files, that looks like this:
ndk_library(
name = 'sqlite_android_bindings',
#deps = [],
#flags = [],
#is_asset = False,
visibility = ['PUBLIC'],
)
The documentation for this rule at
https://buckbuild.com/rule/ndk_library.html doesn't seem to list anything else I should be specifying.
If I build it with buck like this:
$ ndk-build clean && ndk-build
it builds successfully. However, if I try to build it with buck:
---
$ buck build j/3rdparty/sqlite_android_bindings/jni:sqlite_android_bindings
Not using buckd because watchman isn't installed.
No Android platform target specified. Using default: Google Inc.:Google APIs:21
[-] PROCESSING BUCK FILES...FINISHED 0.1s [100%]
[+] BUILDING...0.5s [50%] (0/1 JOBS, 0 UPDATED, 0.0% CACHE MISS)
|=> IDLE
|=> IDLE
|=> //j/3rdparty/sqlite_android_bindings/jni:sqlite_android_bindings... 0.1s (running ndk_build[0.0s])
sqlite/JNIHelp.cpp:28:18: fatal error: string: No such file or directory
#include <string>
^
compilation terminated.
sqlite/android_database_SQLiteConnection.cpp:44:18: fatal error: string: No such file or directory
#include <string>
^
compilation terminated.
---
Searching for that particular build error found me a bunch of pages about needing to configure the android NDK build correctly to use STL, like
http://stackoverflow.com/questions/4893403/cant-include-c-headers-like-vector-in-android-ndkHowever, as far as I can tell the project is already configured the way that says -- and the fact that invoking ndk-build directly works supports that belief. :)
Are there some other arguments I need to pass to ndk_library to get it to build with APP_STL:=stlport_static? Or, does anyone know what else I might be missing?
Thanks!
-Ben