# Sqlcipher build problem

**URL:** <https://discuss.zetetic.net/t/sqlcipher-build-problem/3141>\
**Category:** SQLCipher\
**Created:** [October 5, 2018, 1:24am UTC](https://discuss.zetetic.net/t/sqlcipher-build-problem/3141 "2018-10-05T01:24:48Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![hoyo](https://sea2.discourse-cdn.com/flex016/user_avatar/discuss.zetetic.net/hoyo/32/1099_2.png) [@hoyo](https://discuss.zetetic.net/u/hoyo)\
**Post date:** [October 5, 2018, 1:24am UTC](https://discuss.zetetic.net/t/sqlcipher-build-problem/3141/1 "2018-10-05T01:24:48Z")

</div>

hello.  
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](http://www.jerryrw.com)”,  
I created an exe file.but while building, There was a warning.

//////////////////////////////////////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:

 ![output](https://us1.discourse-cdn.com/flex016/uploads/zetetic/original/1X/0fd4a523ca9304f3bcc800061d0f0deba8c1a9d6.png)

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…

---

<div class="post-metadata">

**Author:** ![developernotes](https://sea2.discourse-cdn.com/flex016/user_avatar/discuss.zetetic.net/developernotes/32/1309_2.png) [@developernotes](https://discuss.zetetic.net/u/developernotes)\
**Post date:** [October 5, 2018, 12:59pm UTC](https://discuss.zetetic.net/t/sqlcipher-build-problem/3141/2 "2018-10-05T12:59:10Z")

</div>

안녕하세요 @hoyo,

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

---

<div class="post-metadata">

**Author:** ![hoyo](https://sea2.discourse-cdn.com/flex016/user_avatar/discuss.zetetic.net/hoyo/32/1099_2.png) [@hoyo](https://discuss.zetetic.net/u/hoyo)\
**Post date:** [October 5, 2018, 1:51pm UTC](https://discuss.zetetic.net/t/sqlcipher-build-problem/3141/3 "2018-10-05T13:51:05Z")

</div>

hello!  
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.

---

<div class="post-metadata">

**Author:** ![developernotes](https://sea2.discourse-cdn.com/flex016/user_avatar/discuss.zetetic.net/developernotes/32/1309_2.png) [@developernotes](https://discuss.zetetic.net/u/developernotes)\
**Post date:** [October 5, 2018, 2:11pm UTC](https://discuss.zetetic.net/t/sqlcipher-build-problem/3141/4 "2018-10-05T14:11:30Z")

</div>

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](https://github.com/sqlcipher/sqlcipher/blob/master/src/main.c#L1438)

---

<div class="post-metadata">

**Author:** ![hoyo](https://sea2.discourse-cdn.com/flex016/user_avatar/discuss.zetetic.net/hoyo/32/1099_2.png) [@hoyo](https://discuss.zetetic.net/u/hoyo)\
**Post date:** [October 5, 2018, 2:17pm UTC](https://discuss.zetetic.net/t/sqlcipher-build-problem/3141/5 "2018-10-05T14:17:19Z")

</div>

Thank!  
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.

---

<div class="post-metadata">

**Author:** ![developernotes](https://sea2.discourse-cdn.com/flex016/user_avatar/discuss.zetetic.net/developernotes/32/1309_2.png) [@developernotes](https://discuss.zetetic.net/u/developernotes)\
**Post date:** [October 8, 2018, 7:07pm UTC](https://discuss.zetetic.net/t/sqlcipher-build-problem/3141/6 "2018-10-08T19:07:43Z")

</div>

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](mailto:support@zetetic.net).

---

<div class="post-metadata">

**Author:** ![hoyo](https://sea2.discourse-cdn.com/flex016/user_avatar/discuss.zetetic.net/hoyo/32/1099_2.png) [@hoyo](https://discuss.zetetic.net/u/hoyo)\
**Post date:** [October 12, 2018, 10:45am UTC](https://discuss.zetetic.net/t/sqlcipher-build-problem/3141/7 "2018-10-12T10:45:27Z")

</div>

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