使用cygwin的Windows上的sqlcipher

时间:2014-01-31 05:27:46

标签: sqlite cygwin sqlcipher

我在这里使用这个网站。 http://retroshare.sourceforge.net/wiki/index.php/Win32CompileLibrariesMingw#Compile_OpenSSL

我遇到了一个问题。错误是

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

我打开ossl_typ.h文件只找到1行,所以我无法追踪错误。谢谢你的帮助!

1 个答案:

答案 0 :(得分:4)

我遇到了尝试构建sqlcipher的同样问题。问题是minGW的最新版本定义了X509_NAME和OCSP_RESPONSE。

您需要将CFLAGS="-DNOCRYPT"添加到./configure,例如./configure --enable-tempstore=yes CFLAGS="-DSQLITE_HAS_CODEC -DSQLITE_TEMP_STORE=2 -DNOCRYPT -lcrypto"以告诉编译器不要先定义这些常量。

以下是解释问题的链接:http://cygwin.com/ml/cygwin/2012-12/msg00194.html