本文共 1085 字,大约阅读时间需要 3 分钟。
首先要在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' |
转载地址:http://peyvx.baihongyu.com/