NDK-建立与源码库错误 [英] ndk-build with sqlite library error

查看:90
本文介绍了NDK-建立与源码库错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我创建它具有SQLite数据库以及本地C code Android应用程序。
当我从我的JNI文件夹做了NDK的构建,我收到以下错误。

I am creating an android application which is having native C code along with sqlite database. When I do a ndk-build from my jni folder,I am getting the following error.

undefined reference to `sqlite3_open'
peard.c:(.text+0x588): undefined reference to `sqlite3_exec'
peard.c:(.text+0x5f8): undefined reference to `sqlite3_exec'
peard.c:(.text+0x668): undefined reference to `sqlite3_exec'
peard.c:(.text+0x6d8): undefined reference to `sqlite3_prepare_v2'
peard.c:(.text+0x720): undefined reference to `sqlite3_column_count'
peard.c:(.text+0x734): undefined reference to `sqlite3_step'
peard.c:(.text+0x774): undefined reference to `sqlite3_column_text'
peard.c:(.text+0x78c): undefined reference to `sqlite3_column_name'
peard.c:(.text+0x800): undefined reference to `sqlite3_close'

我想随着-lsqlite3命令也运行,但不起作用。
谢谢你。

I tried to run along with -lsqlite3 command also,but doesn't work. Thanks.

推荐答案

您需要建立或安装的sqlite3 (和你的项目依赖于所有其他非标准库)< STRONG> Android版,然后构建与 -L -I 参数指向你的项目ARM版本的源码你库和头文件。

You need to build or install sqlite3 (and all other non standard libraries you project depends on) for android, and the build your project with the -L and -I parameters pointing to the arm version of you sqlite libraries and headers.

这篇关于NDK-建立与源码库错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆