Search code examples
sqlitecygwinsqlcipher

sqlcipher on windows using cygwin


I am using this site here. http://retroshare.sourceforge.net/wiki/index.php/Win32CompileLibrariesMingw#Compile_OpenSSL

and I have come across a problem. The error is

In file included from /usr/include/w32api/windows.h:95:0, from sqlite3.c:9607:     
/cygdrive/c/sqlcipher-2.2.0/../openssl-1.0.1c/include/openssl/ossl_typ.h:153:29:     error: expected ‘)’ before numeric constant typedef struct X509_name_st X509_NAME; 
/cygdrive/c/sqlcipher-2.2.0/../openssl-1.0.1c/include/openssl/ossl_typ.h:199:33:     error: expected ‘)’ before numeric constant typedef struct ocsp_response_st OCSP_RESPONSE;
Makefile:573: recipe for target 'sqlite3.lo' failed
make: *** [sqlite3.lo] Error 1

I opened the ossl_typ.h file to find only 1 line in it so i am not able to trace the error. Thank you for your help!


Solution

  • I came across the same problem trying to build sqlcipher. The problem is that recent versions of minGW define X509_NAME and OCSP_RESPONSE.

    You need to add CFLAGS="-DNOCRYPT" to your ./configure, e.g. ./configure --enable-tempstore=yes CFLAGS="-DSQLITE_HAS_CODEC -DSQLITE_TEMP_STORE=2 -DNOCRYPT -lcrypto" in order to tell the compiler not to define these constants first.

    Here is a link that explain the problem : http://cygwin.com/ml/cygwin/2012-12/msg00194.html