【问题标题】:sqlcipher on windows using cygwin使用cygwin在windows上的sqlcipher
【发布时间】:2014-01-31 05:27:46
【问题描述】:

我在这里使用这个网站。 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 行,因此我无法追踪错误。感谢您的帮助!

【问题讨论】:

  • 这是我的 ossl_typ.h 文件.. dropbox.com/s/myia2mcdnwk73dz/ossl_typ.h
  • 哈!你有那些指示工作吗?首先编译器假设它是i686-w64-mingw32-gcc,在我修复它之后我得到了tcl8.6.0/generic/tclPort.h:25:28: fatal error: tclUnixPort.h: No such file or directory 。这只是试图编译tcl8.6!
  • @Michael 大声笑.. 我确实开始工作了.. 但毕竟我认为我浪费了我的时间.. 所以我创建了一个加密文件并用它来编码和解码我的细节SQLite 文件...

标签: sqlite cygwin sqlcipher


【解决方案1】:

我在尝试构建 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

【讨论】:

  • 谢谢。我还发现重命名 X509_NAME 有帮助。非常感谢..:)
  • openssl 在使用 mingw64 编译时会遇到同样的问题。 -DNOCRYPT 在配置/配置时间修复。
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2011-12-27
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2016-08-26
相关资源
最近更新 更多