我想编译 sqlite 合并来创建一个通过用户身份验证受密码保护的数据库。
我遵循了本教程:https://www.sqlite.org/howtocompile.html 还有 SQLite 的 user_authentication 文档: https: //www.sqlite.org/src/doc/trunk/ext/userauth/user-授权.txt
当我尝试在不使用额外的编译时选项“-DSQLITE_USER_AUTHENTICATION”并且不添加其他文档的情况下编译它时,它可以工作。当我尝试编译它时,我在 sqlite.c 处收到错误 C2129,在 userauth.c 处收到错误 C1083
该目录中有以下文件:
cl -DSQLITE_USER_AUTHENTICATION shell.c sqlite3.c userauth.c -Fesqlite3.exe
Run Code Online (Sandbox Code Playgroud)
以下输出:
shell.c
sqlite3.c
sqlite3.c(222878): error C2129: static function 'void sqlite3CryptFunc(sqlite3_context *,int,sqlite3_value **)' declared but not defined
sqlite3.c(16263): note: see declaration of 'sqlite3CryptFunc'
userauth.c
userauth.c(26): fatal error C1083: Cannot open include file: 'sqliteInt.h': No such file or directory
Generating Code...
Run Code Online (Sandbox Code Playgroud)
如果 c 中有类似 C# 的 db.SetPassword("MyPW") 的东西,那就完美了!