首先,我使用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库是否被正确链接和构建。这是一个很好的构建吗?
发布于 2018-10-07 21:56:51
我可以忽略这个警告吗?
不,你不能。
链接器缺少在文件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的这个构建失败了。
https://stackoverflow.com/questions/52689128
复制相似问题