gpt4 book ai didi

c - 如何构建 sqlcipher?

转载 作者:行者123 更新时间:2023-11-30 14:45:53 27 4
gpt4 key购买 nike

首先,我使用 mingw 完成了构建并创建了 sqlcipher.exe 文件。顺便说一下,构建过程中出现了警告。所以,我怀疑我是否正确构建了它。

警告内容:

$ make
./libtool --mode=compile --tag=CC gcc -DSQLITE_HAS_CODEC -DSQLCIPHER_CRYPTO_OPENSSL -I/c/opensslbuild32/include /c/sqlcipher/libeay32.dll -L/c/sqlcipher/ -static-libgcc -DSQLITE_OS_WIN=1 -I. -I/c/sqlcipher/src -I/c/sqlcipher/ext/rtree -I/c/sqlcipher/ext/icu -I/c/sqlcipher/ext/fts3 -I/c/sqlcipher/ext/async -I/c/sqlcipher/ext/session -D_HAVE_SQLITE_CONFIG_H -DBUILD_sqlite -DNDEBUG -DSQLITE_THREADSAFE=1 -DSQLITE_TEMP_STORE=1 -c sqlite3.c
libtool: compile: gcc -DSQLITE_HAS_CODEC -DSQLCIPHER_CRYPTO_OPENSSL -I/c/opensslbuild32/include /c/sqlcipher/libeay32.dll -L/c/sqlcipher/ -static-libgcc -DSQLITE_OS_WIN=1 -I. -I/c/sqlcipher/src -I/c/sqlcipher/ext/rtree -I/c/sqlcipher/ext/icu -I/c/sqlcipher/ext/fts3 -I/c/sqlcipher/ext/async -I/c/sqlcipher/ext/session -D_HAVE_SQLITE_CONFIG_H -DBUILD_sqlite -DNDEBUG -DSQLITE_THREADSAFE=1 -DSQLITE_TEMP_STORE=1 -c sqlite3.c -DDLL_EXPORT -DPIC -o .libs/sqlite3.o
sqlite3.c: In function 'sqlcipher_cipher_profile':
sqlite3.c:21289:8: warning: implicit declaration of function 'fopen_s' [-Wimplicit-function-declaration]
if(fopen_s(&f, destination, "a") != 0){
^~~~~~~
gcc.exe: warning: c:/sqlcipher/libeay32.dll: linker input file because linking not done

特别是,我认为这句话有问题。

我可以忽略这个警告吗?我担心 openssl 库是否正确链接和构建。这是一个好的构建吗?

最佳答案

Can I ignore the warning?

不,你不能。

链接器错过了在文件 sqlite3.c 第 21289 行调用的 fopen_s() 的实现:

sqlite3.c:21289:8: warning: implicit declaration of function 'fopen_s' [-Wimplicit-function-declaration]
if(fopen_s(&f, destination, "a") != 0){
^~~~~~~

所以,这次的 libeay32.dll 构建失败了。

关于c - 如何构建 sqlcipher?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/52689128/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com