SQLite 3.7.13的加密解密(二)—— 开放宏定义

前端之家收集整理的这篇文章主要介绍了SQLite 3.7.13的加密解密(二)—— 开放宏定义前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。

首先要在sqlite3.c中最前面,添加代码(网上有说在sqlite3.h中添加也可,实际测试在sqlite3.h中打开该宏是无效的):

#ifndefsqlITE_HAS_CODEC

#definesqlITE_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'

本文出自 “rainman博客,请务必保留此出处@L_404_1@

原文链接:https://www.f2er.com/sqlite/201683.html

猜你在找的Sqlite相关文章