首先要在sqlite3.c中最前面,添加代码(网上有说在sqlite3.h中添加也可,实际测试在sqlite3.h中打开该宏是无效的):
#ifndef sqlITE_HAS_CODEC #define sqlITE_HAS_CODEC #endif |
这个宏是用来确定是否支持加密的。添加上述代码后编译,会出现如下错误:
D:\Research\MysqLite\Debug/../src/sqlite3.c:80963: undefined reference to `sqlite3CodecAttach' D:\Research\MysqLite\Debug/../src/sqlite3.c:80968: undefined reference to `sqlite3CodecGetKey' D:\Research\MysqLite\Debug/../src/sqlite3.c:80970: undefined reference to `sqlite3CodecAttach' src\sqlite3.o: In function `sqlite3Pragma': D:\Research\MysqLite\Debug/../src/sqlite3.c:94023: undefined reference to `sqlite3_key' D:\Research\MysqLite\Debug/../src/sqlite3.c:94026: undefined reference to `sqlite3_rekey' D:\Research\MysqLite\Debug/../src/sqlite3.c:94038: undefined reference to `sqlite3_key' D:\Research\MysqLite\Debug/../src/sqlite3.c:94040: undefined reference to `sqlite3_rekey' D:\Research\MysqLite\Debug/../src/sqlite3.c:94048: undefined reference to `sqlite3_activate_see' src\sqlite3.o: In function `sqlite3RunVacuum': D:\Research\MysqLite\Debug/../src/sqlite3.c:101744: undefined reference to `sqlite3CodecGetKey' |
原文地址:https://www.jb51.cc/sqlite/201908.html
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。