Sqlcipher build problem


I’m korean. I’m using a translator.
So, even if the grammar is awkward, please understand.
In fact, I don’t know if I’m asking questions here.
Anyway, I built sqlcipher by referring to “http://www.jerryrw.com”,
I created an exe file.but while building, There was a warning.

$ 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 unused because linking not done

and sqlcipher.exe does not seem to work well.
After running the executable, I got the following output:

I think the results should be different.
Because I encrypted it, ---->file is encrypted or is not a database<----
However, I got different results.

Please help me build sqlcipher properly…


안녕하세요 @hoyo,

위의 예에서 암호로 생성 된 데이터베이스 파일을 두 번째로 열면 암호를 다시 입력해야 해당 암호에 액세스 할 수 있습니다. 데이터베이스 파일을 다시 열고 'PRAGMA key ='1234 ';를 지정하고 데이터베이스 내용에 액세스 할 수 있는지 확인하십시오. 감사!


Thank you for answer.
but, I knew what you answered.
When the PRAGMA key is not entered, I want to know if this sentence is right. —>“files is not a database”.
Because I encrypted it.I think the results are different from others.---->"files is encrypted or files is not a database "
So,I think the build did not work.
also, Can I ignore warnings?
“gcc.exe: warning: c:/sqlcipher/libeay32.dll: linker input file unused because linking not done”
I’m wondering if the openssl library was properly linked and built.
Thank you.


Hello @hoyo

Yes, that is the correct message, the error code is 26, SQLITE_NOTADB. The text representation of the error was changed to "file is not a database" in upstream SQLite. The message is defined here


One more question.
I wonder if I can still ignore the warning.
“gcc.exe: warning: c:/sqlcipher/libeay32.dll: linker input file unused because linking not done”
Due to the warning, I’m wondering if the build is working properly.


Hello @hoyo

That linker warning does not look good, you should investigate further and verify any generated database from your build is in fact encrypted.

Outside of that, it’s very difficult to troubleshoot this sort of issue since there are so may places that things can go wrong in the build chain, linking, deployment etc. For this reason, we typically don’t support custom builds of SQLCipher without an enterprise support agreement.

If you are finding commercial value in using SQLCipher and would like to discuss enterprise support options please feel free to reach out to us at support@zetetic.net.


Thank you for answer.
I will look for more. Thank you.