SQLCipher with MinGW/MSYS?

12736 views
Skip to first unread message

Will Parsons

unread,
Dec 23, 2009, 8:48:58 PM12/23/09
to SQLCipher Users
Hello from a new user!

First of all, thanks to Stephen Lombardo for creating and making
available SQLCipher. I've recently downloaded 1.1.0 and have
successfully (I think) incorporated it into an application that I've
been developing on FreeBSD for some years now to keep track of church
offerings. I'm the only developer and currently the only user of the
application, but I'd like to make it useful for others who would
probably want to use it under Windows. (Apart from SQLCipher, the
application can already be compiled for Windows using MinGW/MSYS.)

Has anyone succeeded in using SQLCipher under Windows? My preference
would be to use the MinGW/MSYS toolchain, but I'd be interested in any
solutions.

--
Will

Stephen Lombardo

unread,
Dec 23, 2009, 10:30:24 PM12/23/09
to sqlc...@googlegroups.com
Hi Will,

It's good to hear from you. We included a whole bunch of fixes in 1.1.0 that allow SQLCipher to be used on windows. With the latest sources I've compiled and run it successfully using both MInGW and Visual Studio.

The trickier part is getting OpenSSL going. I was not able to get a simple MinGW build of OpenSSL working due to various issues in the make system cased by MinGW's lack of symlinks. However, building OpenSSL is fairly easy if you have Visual Studio and ActiveState Perl on your system. Just run the following from the visual studio command line (ensure perl is in the path)

perl Configure VC-WIN32 --prefix=build
ms\do_masm.bat
nmake -f ms\nt.mak
nmake -f ms\ntdll.mak
nmake -f ms\nt.mak install

That will drop libeay32.dll and libeay32.lib file in build/bin. From there you can copy libeay32.dll over to your sqlcipher directory and run the sqlcipher build under msys. It's pretty standard, just disable tcl since it won't be present under a default install.

./configure --disable-tcl CFLAGS="-DSQLITE_HAS_CODEC -I/path/to/openssl/include" LDFLAGS="-leay32"
make
make dll

That will create a working sqlite3 binary and sqlite3.dll.

I've also been successful in compiling the amalgamated sqlite3.c in a Visual Studio project and statically linking it to libeay32.lib to remove the runtime dll dependencies.

Cheers,
Stephen

==
Stephen Lombardo
http://www.zetetic.net

Will Parsons

unread,
Dec 24, 2009, 8:31:14 AM12/24/09
to sqlc...@googlegroups.com
Hi Stephen,

Thanks for the info. I have ActiveState Perl, but I don't have Visual Studio,
so it looks like I'll have to look at other means of getting OpenSSL on
Windows. For curiosity, have you tried to get SQLCipher to work under Cygwin?
I might have difficulties using Cygwin for reasons other to do with SQLCipher,
but it would be interesting to know if that part would work.

Thanks again.

Stephen Lombardo

unread,
Dec 24, 2009, 9:49:03 AM12/24/09
to sqlc...@googlegroups.com
Hi Will,

Both SQLCipher and OpenSSL will work just fine with Cygwin so that is a great option as well as long as you don't mind the dependency. One other option would be to use a pre-compiled OpenSSL DLL with MinGW so you don't have to build it from scratch: http://www.openssl.org/related/binaries.html. I haven't used it before personally, but it should work just fine with the method described below.

Cheers,
Stephen

Adriano Ribeiro

unread,
Jan 28, 2010, 6:55:13 PM1/28/10
to SQLCipher Users
Hi, Stephen

Firstly, fantastic work! I new with SQLite and mainly with SQCipher,
did you have patched amalgamated sqlite3.c? I would like to integrate
in my game engine.

thanks.

On 24 dez 2009, 12:49, Stephen Lombardo <sjlomba...@zetetic.net>
wrote:


> Hi Will,
>
> Both SQLCipher and OpenSSL will work just fine with Cygwin so that is a
> great option as well as long as you don't mind the dependency. One other
> option would be to use a pre-compiled OpenSSL DLL with MinGW so you don't
> have to build it from scratch:http://www.openssl.org/related/binaries.html.
> I haven't used it before personally, but it should work just fine with the
> method described below.
>
> Cheers,
> Stephen
>

> > > On Wed, Dec 23, 2009 at 8:48 PM, Will Parsons <gylia...@gmail.com>

Stephen Lombardo

unread,
Feb 3, 2010, 6:25:54 AM2/3/10
to sqlc...@googlegroups.com
Hi Adriano,

We don't have a prepared sqlite3.c file for use with SQLCipher. The best way to do this is to grab the source of of github from http://github.com/sjlombardo/sqlcipher, run the configuration described on our site (http://www.zetetic.net/software/sqlcipher#building), but then run

make sqlite3

That make target will generate the amalgamation file from the sources, which you can then import into your project. Note however that even if you use the sqlite3.c amalgamation you need to have your build dependencies setup properly for OpenSSL (i.e. includes and linking).

Cheers,
Stephen

Stephen Lombardo

unread,
Feb 5, 2010, 4:10:31 AM2/5/10
to sqlc...@googlegroups.com
Folks,

Some people have reported issues building SQLCipher under MinGW. The root of the issue rests with corruption of the sqlite3.h header file in the build directory. This can occur a variety of ways, but the most likely reason is performing a build without having tclsh in your path, etc. Unfortunately make will not overwrite sqlite3.h if it is present in any form. If there is a corrupted or empty sqlite3.h file you will see many gcc errors referencing invalid types, etc. 

To resolve this issue, you simply need to delete sqlite3.h from the sqlcipher directory and then run make again. However, before you do, you must ensure that if you are using the amalgamation build (the default used by configure) that you have tclsh installed. Alternately you could try to configure with --disable-amalgamation. 

Cheers,
Stephen

Yasriady

unread,
Feb 5, 2010, 8:49:33 PM2/5/10
to SQLCipher Users
Hi Stephen,

Nice to see this sqlcipher distributed widely.
Anyway, I get failed to run make under msys with following message:

...
.........
libtool: link: gcc -DSQLITE_HAS_CODEC -I/home/compile/OpenSSL/include -
DSQLITE_O
S_WIN=1 -I. -I./src -D_HAVE_SQLITE_CONFIG_H -DNDEBUG -I/opt/tcl/
include -DSQLITE
_THREADSAFE=1 -DSQLITE_THREAD_OVERRIDE_LOCK=-1 -
DSQLITE_OMIT_LOAD_EXTENSION=1 -D
HAVE_READLINE=0 -o .libs/sqlite3.exe ./src/shell.c ./.libs/
libsqlite3.a -L/usr/
local/lib
./.libs/libsqlite3.a(crypto.o):crypto.c:(.text+0xe): undefined
reference to `EVP_get_cipherbyname'
./.libs/libsqlite3.a(crypto.o):crypto.c:(.text+0x17): undefined
reference to `OPENSSL_add_all_algorithms_noconf'
./.libs/libsqlite3.a(crypto.o):crypto.c:(.text+0x514): undefined
reference to `PKCS5_PBKDF2_HMAC_SHA1'
./.libs/libsqlite3.a(crypto.o):crypto.c:(.text+0x598): undefined
reference to `RAND_pseudo_bytes'
./.libs/libsqlite3.a(crypto.o):crypto.c:(.text+0x5eb): undefined
reference to `EVP_CipherInit'
./.libs/libsqlite3.a(crypto.o):crypto.c:(.text+0x601): undefined
reference to `EVP_CIPHER_CTX_set_padding'
./.libs/libsqlite3.a(crypto.o):crypto.c:(.text+0x632): undefined
reference to `EVP_CipherInit'
...
....
.....

My configuration command is:

./configure --disable-amalgamation --disable-tcl CFLAGS="-
DSQLITE_HAS_CODEC -I/home/compile/openssl-0.9.8l/include/openssl"
LDFLAGS="-Leay32"

Note: which one the correct LDFLAGS parameter?
LDFLAGS="-leay32" (this flag return error)
or
LDFLAGS="-Leay32" (with this flag configure can working normally)
With this flag, meaning what? is it a directory? What purpose, and in
which location?

Thank you,
Dedy Yasriady


On Feb 5, 4:10 pm, Stephen Lombardo <sjlomba...@zetetic.net> wrote:
> Folks,
>
> Some people have reported issues building SQLCipher under MinGW. The root of
> the issue rests with corruption of the sqlite3.h header file in the build
> directory. This can occur a variety of ways, but the most likely reason is
> performing a build without having tclsh in your path, etc. Unfortunately
> make will not overwrite sqlite3.h if it is present in any form. If there is
> a corrupted or empty sqlite3.h file you will see many gcc errors referencing
> invalid types, etc.
>
> To resolve this issue, you simply need to delete sqlite3.h from
> the sqlcipher directory and then run make again. However, before you do, you
> must ensure that if you are using the amalgamation build (the default used
> by configure) that you have tclsh installed. Alternately you could try to
> configure with --disable-amalgamation.
>
> Cheers,
> Stephen
>

> On Wed, Feb 3, 2010 at 6:25 AM, Stephen Lombardo <sjlomba...@zetetic.net>wrote:
>
> > Hi Adriano,
>
> > We don't have a prepared sqlite3.c file for use with SQLCipher. The best
> > way to do this is to grab the source of of github from
> >http://github.com/sjlombardo/sqlcipher, run the configuration described on
> > our site (http://www.zetetic.net/software/sqlcipher#building), but then
> > run
>
> > make sqlite3
>
> > That make target will generate the amalgamation file from the sources,
> > which you can then import into your project. Note however that even if you
> > use the sqlite3.c amalgamation you need to have your build dependencies
> > setup properly for OpenSSL (i.e. includes and linking).
>
> > Cheers,
> > Stephen
>

Stephen Lombardo

unread,
Feb 16, 2010, 3:27:17 PM2/16/10
to sqlc...@googlegroups.com
Hi Yasriady,

Sorry for the delayed response. The errors you have referenced below are caused because you do not have the openssl crypto DLL available at link time. If you refer to earlier emails in this thread you will find general instructions on how to build libeay32.dll from the OpenSSL source code:


Alternately you can try one of the binaries available on the internet. Once you have libeay32.dll available you can either place it in sqlcipher directly while you compile, or add the following to your LDFLAGS options:

-L/path/to/folder/containing/dll

Please let us know if that resolves the issue you're seeing.

Cheers,
Stephen

Yasriady

unread,
Feb 22, 2010, 2:27:22 AM2/22/10
to SQLCipher Users
Hi Stephen,

I'm trying to install Windows binary "Win32OpenSSL-0_9_8l.exe" to c:
\OpenSSL and doing following step:

- copy libeay32.dll to sqlcipher directory.
- copy C:\OpenSSL\lib\MinGW to c:\MinGW\lib
- doing configure and make as follow:

./configure --disable-tcl CFLAGS="-DSQLITE_HAS_CODEC -I/c/openSSL/
include" LDFLAGS="-leay32"
make

until here i can sucessfully get sqlite3.exe but when executing "make
dll" I got error similar as above ones.

Any idea? please do assist.

Thank you and regards,
Dedy Yasriady


On Feb 17, 3:27 am, Stephen Lombardo <sjlomba...@zetetic.net> wrote:
> Hi Yasriady,
>
> Sorry for the delayed response. The errors you have referenced below are
> caused because you do not have the openssl crypto DLL available at link
> time. If you refer to earlier emails in this thread you will find general
> instructions on how to build libeay32.dll from the OpenSSL source code:
>
> http://groups.google.com/group/sqlcipher/msg/6cc3209fb7f36ea7
>
> Alternately you can try one of the binaries available on the internet. Once
> you have libeay32.dll available you can either place it in sqlcipher
> directly while you compile, or add the following to your LDFLAGS options:
>
> -L/path/to/folder/containing/dll
>
> Please let us know if that resolves the issue you're seeing.
>
> Cheers,
> Stephen
>

Yasriady

unread,
Feb 22, 2010, 2:35:23 AM2/22/10
to SQLCipher Users
Stephen,

Regarding my previous explanation, here I send error appear on msys
compling while executing "make all"

---------------------------------------------------------------------------------------------------------------------------------------------------------

Dedy Yasriady@DDY /c/src/sjlombardo-sqlcipher-982f416
$ make dll
echo 'EXPORTS' >sqlite3.def
nm .libs/sqlite3.o | grep ' T ' | grep ' _sqlite3_' \
| sed 's/^.* _//' >>sqlite3.def
gcc -DSQLITE_HAS_CODEC -I/c/openSSL/include -DSQLITE_OS_WIN=1 -I. -
I./src -D_H
AVE_SQLITE_CONFIG_H -DNDEBUG -DSQLITE_THREADSAFE=1 -
DSQLITE_THREAD_OVERRIDE_LO
CK=-1 -DSQLITE_OMIT_LOAD_EXTENSION=1 -shared -o sqlite3.dll
sqlite3.def \
-Wl,"--strip-all" .libs/sqlite3.o
.libs/sqlite3.o:sqlite3.c:(.text+0x4f7): undefined reference to
`PKCS5_PBKDF2_HMAC_SHA1'
.libs/sqlite3.o:sqlite3.c:(.text+0x57b): undefined reference to
`RAND_pseudo_bytes'
.libs/sqlite3.o:sqlite3.c:(.text+0x5ce): undefined reference to
`EVP_CipherInit'
.libs/sqlite3.o:sqlite3.c:(.text+0x5e4): undefined reference to
`EVP_CIPHER_CTX_set_padding'
.libs/sqlite3.o:sqlite3.c:(.text+0x615): undefined reference to
`EVP_CipherInit'
.libs/sqlite3.o:sqlite3.c:(.text+0x642): undefined reference to
`EVP_CipherUpdate'
.libs/sqlite3.o:sqlite3.c:(.text+0x678): undefined reference to
`EVP_CipherFinal'
.libs/sqlite3.o:sqlite3.c:(.text+0x694): undefined reference to
`EVP_CIPHER_CTX_cleanup'
.libs/sqlite3.o:sqlite3.c:(.text+0x7c6): undefined reference to
`EVP_get_cipherbyname'
.libs/sqlite3.o:sqlite3.c:(.text+0x7da): undefined reference to
`EVP_CIPHER_key_length'
.libs/sqlite3.o:sqlite3.c:(.text+0x7ee): undefined reference to
`EVP_CIPHER_iv_length'
.libs/sqlite3.o:sqlite3.c:(.text+0xcef): undefined reference to
`RAND_pseudo_bytes'
.libs/sqlite3.o:sqlite3.c:(.text+0xe2b): undefined reference to
`OPENSSL_add_all_algorithms_noconf'
.libs/sqlite3.o:sqlite3.c:(.text+0xe7f): undefined reference to
`OPENSSL_add_all_algorithms_noconf'
.libs/sqlite3.o:sqlite3.c:(.text+0xf33): undefined reference to
`RAND_pseudo_bytes'
collect2: ld returned 1 exit status
make: *** [sqlite3.dll] Error 1

---------------------------------------------------------------------------------------------------------------------------------------------------------

Please assist and thank you,
Dedy Yasriady


On Feb 17, 3:27 am, Stephen Lombardo <sjlomba...@zetetic.net> wrote:
> Hi Yasriady,
>
> Sorry for the delayed response. The errors you have referenced below are
> caused because you do not have the openssl crypto DLL available at link
> time. If you refer to earlier emails in this thread you will find general
> instructions on how to build libeay32.dll from the OpenSSL source code:
>
> http://groups.google.com/group/sqlcipher/msg/6cc3209fb7f36ea7
>
> Alternately you can try one of the binaries available on the internet. Once
> you have libeay32.dll available you can either place it in sqlcipher
> directly while you compile, or add the following to your LDFLAGS options:
>
> -L/path/to/folder/containing/dll
>
> Please let us know if that resolves the issue you're seeing.
>
> Cheers,
> Stephen
>

Yasriady

unread,
Feb 24, 2010, 2:13:22 AM2/24/10
to SQLCipher Users
After several trial and error, finally I could compile sqlcipher and
result sqlite3.dll in source directory.
And then, could some body give idea how to start code in C++?
I want to access sqlite database and encrypt the data as well.
I'm really new and need your guide to start with sqlcipher.........

Thank you and best regards,
Dedy Yasriady

> ...
>
> read more »

Stephen Lombardo

unread,
Feb 24, 2010, 10:58:31 PM2/24/10
to sqlc...@googlegroups.com
Hi Dedy,

Could you reply to the group with the configuration changes you made. It was clear from your earlier emails that linking was failing. Did you move the libea32.dll to the build directory, or take my suggestion to alter the library path?

Regarding the best way to start using SQLCipher, I'd suggest you take a quick look at the following tutorial. It was authored for the iPhone, but the code and sample at the end is still applicable for any platform.


Cheers,
Stephen

Yasriady

unread,
Feb 24, 2010, 10:58:45 PM2/24/10
to SQLCipher Users
I'm sorry, I made mistake while compiling as follow:
./configure --disable-tcl --disable-amalgamation CFLAGS="-
DSQLITE_HAS_CODE -I/c/OpenSSL/include" LDFLAGS="-leay32"

See at CFLAGS, this mean there was no CODEC included to sqlcipher. And
compiling will work normally without crypto included.

When I compile back using correct command:
./configure --disable-tcl --disable-amalgamation CFLAGS="-
DSQLITE_HAS_CODEC -I/c/OpenSSL/include" LDFLAGS="-leay32"

I still get similar error mentioned about no reference to crypto
library:

.libs/sqlite3.o:sqlite3.c:(.text+0x4f7): undefined reference to
`PKCS5_PBKDF2_HMAC_SHA1'
.libs/sqlite3.o:sqlite3.c:(.text+0x57b): undefined reference to
`RAND_pseudo_bytes'
.libs/sqlite3.o:sqlite3.c:(.text+0x5ce): undefined reference to
`EVP_CipherInit'
.libs/sqlite3.o:sqlite3.c:(.text+0x5e4): undefined reference to
`EVP_CIPHER_CTX_set_padding'
.libs/sqlite3.o:sqlite3.c:(.text+0x615): undefined reference to
`EVP_CipherInit'
.libs/sqlite3.o:sqlite3.c:(.text+0x642): undefined reference to
`EVP_CipherUpdate'
.libs/sqlite3.o:sqlite3.c:(.text+0x678): undefined reference to
`EVP_CipherFinal'
.libs/sqlite3.o:sqlite3.c:(.text+0x694): undefined reference to
`EVP_CIPHER_CTX_cleanup'

I made copy of libeay32.dll to sqlcipher source directory, but above
error still appear.
Can somebody point me out how to resolve this problem? Specially on
how to make compiler can linking well to crypto libray in OpenSSL ?

Anyway
Adriano, thanks for sending me VSNet project to compile amalgamated
version.
But I'm not make try to use the library since I now using VS 6.


Thank you and best regards,
Dedy Yasriady

> ...
>
> read more »

Stephen Lombardo

unread,
Feb 24, 2010, 11:07:07 PM2/24/10
to sqlc...@googlegroups.com
Hi Dedy,

Try the -L flag in the LDFLAGS assignent like this:

./configure --disable-tcl --disable-amalgamation CFLAGS="-
DSQLITE_HAS_CODE -I/c/OpenSSL/include" LDFLAGS="-leay32 -L/c/OpenSSL/lib"

Cheers,
Stephen

Yasriady

unread,
Feb 25, 2010, 3:37:28 AM2/25/10
to SQLCipher Users
Still can not work,
Similar error still appear...........

FYI: I used Win32OpenSSL-0_9_8l.exe

Any other idea?
Or some body else in this group can give me the clue, please?

On Feb 25, 11:07 am, Stephen Lombardo <sjlomba...@zetetic.net> wrote:
> Hi Dedy,
>
> Try the -L flag in the LDFLAGS assignent like this:
>
> ./configure --disable-tcl --disable-amalgamation CFLAGS="-
> DSQLITE_HAS_CODE -I/c/OpenSSL/include" LDFLAGS="-leay32 -L/c/OpenSSL/lib"
>
> Cheers,
> Stephen
>

> ...
>
> read more »

Michael Stephenson

unread,
Feb 25, 2010, 9:50:46 AM2/25/10
to sqlc...@googlegroups.com
Well, I got this working in VS 2003, but if you're using VS 6, then the same
process should theoretically work I guess.

In a nutshell, what I did was:
1) Built openssl as a static lib.
2) Built sqlite as a static lib (and tested the lib in a demo app).
3) Copied the following four files from the sqlcipher source on top of the
sqlite source: crypto.c, crypto.h, pager.c, pragma.h
4) Added the openssl lib to the sqlite project dependencies.
5) Rebuild the sqlite lib and renamed the output lib from sqlite3.lib to
sqlcipher3.lib.

To make things a little simpler, I added this to a header file, so as not to
have to manually add the sqlcipher library to other projects.

#ifdef _DEBUG
# pragma comment(lib, "sqlcipher3d.lib")
#else
# pragma comment(lib, "sqlcipher3.lib")
#endif

~Mike

Yasriady

unread,
Mar 1, 2010, 4:45:53 AM3/1/10
to SQLCipher Users
Dear groups,

Finally, after days searching and trying, I made compiled sqlchiper
with Eclipse Galileo.
Seem eclipse employing MinGW for it’s external compiler/linker, with
easier gui navigation to set compile parameter.
It could works and yield me sqlite3.dll as hoped. I took following
steps:

- In eclipse, I choose new project manage “C Project” for shared
library
- Then copy sqlite3.h, sqlite3.c and src/sqlite3ext.h into my eclipse
project
sqlite3.h and sqlite3.c is ones yielded by “make” command at msys
environment.
- Adjust eclipse property to match requirement:
[C/C++ Build] -> [Settings] -> [Tool Settings] -> [GCC C Compiler] and
supply following:
Symbol (-D) : SQLITE_HAS_CODEC
Include paths (-I) need to point out to OpenSSL include directory.
[MinGW C Linker] -> [Libraries]
Libraries (-l): eay32
Library search path (-L) need to point to OpenSSL library directory.

Stephen,
Thanks for spread sqlcipher widely and assist me to compile it.
The problem I found is mostly about linking to openssl library.
I could configure ecplise to find the "include/openssl" and “library”
search path.

Mike,
I'm not made a try your method yet, but thanks anyway for the
guide...........

Others, your comment and suggestion are welcome.

Cheers,
Dedy Yasriady


On Feb 25, 9:50 pm, "Michael Stephenson" <domehead...@gmail.com>
wrote:

> ...
>
> read more »

Dimitri

unread,
Mar 23, 2010, 7:00:44 PM3/23/10
to SQLCipher Users
Hi all,

If you have still opensll linking problems while building shared
SQLite library with SQLCipher
with MinGW/MSYS like following:


.libs/sqlite3.o:sqlite3.c:(.text+0x57b): undefined reference to
`RAND_pseudo_bytes'
.libs/sqlite3.o:sqlite3.c:(.text+0x5ce): undefined reference to
`EVP_CipherInit'
.libs/sqlite3.o:sqlite3.c:(.text+0x5e4): undefined reference to
`EVP_CIPHER_CTX_set_padding'
.libs/sqlite3.o:sqlite3.c:(.text+0x615): undefined reference to
`EVP_CipherInit'

try to use next solution:

open Makefile, scroll down and find the line for sqlite3.dll target:

sqlite3.dll: $(REAL_LIBOBJ) sqlite3.def
$(TCC) -shared -o $@ sqlite3.def \
-Wl,"--strip-all" $(REAL_LIBOBJ)

change it to next one (add the library path and name)

sqlite3.dll: $(REAL_LIBOBJ) sqlite3.def
$(TCC) -shared -o$@ sqlite3.def \
-Wl,"--strip-all" $(REAL_LIBOBJ) -LC:\PATH_TO_OPEN_SSL\lib\MinGW -
leay32

Don't forget to put your path to openssl folder.

After that build the library with the command
$ make dll

Regards,
Dimitri

> ...
>
> read more »

Stephen Lombardo

unread,
Mar 23, 2010, 10:18:01 PM3/23/10
to sqlc...@googlegroups.com
Hi Dimitri,

You will find that earlier in this thread I recommend a similar configuration, except via environmental variables. I've done some investigation here, and if you reconfigure and place the linker flags in the CFLAGS environmental variable you'll be able to build both the SQLCipher exe and dll without modifying the makefile, i.e. 

./configure --disable-tcl --disable-amalgamation CFLAGS="-DSQLITE_HAS_CODE -I/c/OpenSSL/include -leay32 -L/c/OpenSSL/lib"
make
make dll

Personally, I think this is a better way to configure the system at compile time because it doesn't require any changes to the Makefile (which could be overwritten or made obsolete by newer versions). Either way, as you've noted, the important thing is that libeay32.dll must either be in $PATH, or pointed to by the -L flag to gcc. Of course for this sort of build libeay32.dll will still need to be in the path at runtime. 

Let me know if that new command works for you. Thanks!

Cheers,
Stephen

To unsubscribe from this group, send email to sqlcipher+unsubscribegooglegroups.com or reply to this email with the words "REMOVE ME" as the subject.

illuk

unread,
Mar 25, 2010, 12:08:43 PM3/25/10
to SQLCipher Users
Hi all. Thank you, Stephen. Your advice to reinstall msys & mingw
worked. But --disable-amalgamation had no effect. I had to build &
install tcl.
As a result 'make' command partially worked.
Unfortunately i've got the following messages...

$ make
./libtool --mode=compile --tag=CC gcc -DSQLITE_HAS_CODEC -I/c/
OpenSSL/include/
openssl -DSQLITE_OS_WIN=1 -I. -I./src -D_HAVE_SQLITE_CONFIG_H -
DNDEBUG -DSQLIT
E_THREADSAFE=1 -DSQLITE_THREAD_OVERRIDE_LOCK=-1 -
DSQLITE_OMIT_LOAD_EXTENSION=1
-DSQLITE_TEMP_STORE=1 -c ./src/alter.c
libtool: compile: gcc -DSQLITE_HAS_CODEC -I/c/OpenSSL/include/openssl
-DSQLITE_
OS_WIN=1 -I. -I./src -D_HAVE_SQLITE_CONFIG_H -DNDEBUG -


DSQLITE_THREADSAFE=1 -DSQ
LITE_THREAD_OVERRIDE_LOCK=-1 -DSQLITE_OMIT_LOAD_EXTENSION=1 -

DSQLITE_TEMP_STORE=
1 -c ./src/alter.c -DDLL_EXPORT -DPIC -o .libs/alter.o
In file included from ./src/alter.c:15:
./src/sqliteInt.h:431: error: syntax error before "i64"
./src/sqliteInt.h:431: warning: data definition has no type or storage
class
./src/sqliteInt.h:432: error: syntax error before "u64"
./src/sqliteInt.h:432: warning: data definition has no type or storage
class
In file included from ./src/sqliteInt.h:643,
from ./src/alter.c:15:
./src/btree.h:58: error: syntax error before "sqlite3"
./src/btree.h:157: error: syntax error before "i64"
./src/btree.h:163: error: syntax error before "i64"
./src/btree.h:171: error: syntax error before "i64"
./src/btree.h:177: error: syntax error before "sqlite3_int64"
./src/btree.h:178: error: syntax error before
"sqlite3BtreeGetCachedRowid"
./src/btree.h:178: warning: data definition has no type or storage
class
./src/btree.h:192: error: syntax error before "i64"
./src/btree.h:207: error: syntax error before '*' token
./src/btree.h:217: error: syntax error before '*' token
In file included from ./src/sqliteInt.h:644,
from ./src/alter.c:15:
./src/vdbe.h:54: error: syntax error before "i64"
./src/vdbe.h:54: warning: no semicolon at end of struct or union
./src/vdbe.h:54: warning: no semicolon at end of struct or union
./src/vdbe.h:64: error: syntax error before '}' token
./src/vdbe.h:64: warning: data definition has no type or storage class
./src/vdbe.h:72: error: syntax error before '}' token
In file included from ./src/sqliteInt.h:644,
from ./src/alter.c:15:
./src/vdbe.h:167: error: syntax error before '*' token
./src/vdbe.h:199: error: syntax error before '*' token
./src/vdbe.h:199: warning: data definition has no type or storage
class
./src/vdbe.h:203: error: syntax error before '*' token
./src/vdbe.h:204: error: syntax error before '*' token
./src/vdbe.h:204: warning: data definition has no type or storage
class
In file included from ./src/sqliteInt.h:645,
from ./src/alter.c:15:
./src/pager.h:88: error: syntax error before '*' token
./src/pager.h:95: error: syntax error before ')' token
./src/pager.h:107: error: syntax error before
"sqlite3PagerJournalSizeLimit"
./src/pager.h:107: error: syntax error before "i64"
./src/pager.h:107: warning: data definition has no type or storage
class
./src/pager.h:108: error: syntax error before '*' token
./src/pager.h:108: warning: data definition has no type or storage
class
./src/pager.h:140: error: syntax error before '*' token
./src/pager.h:140: warning: data definition has no type or storage
class
./src/pager.h:141: error: syntax error before '*' token
./src/pager.h:141: warning: data definition has no type or storage
class
In file included from ./src/sqliteInt.h:648,
from ./src/alter.c:15:
./src/os.h:233: error: syntax error before '*' token
./src/os.h:234: error: syntax error before '*' token
./src/os.h:235: error: syntax error before '*' token
./src/os.h:236: error: syntax error before '*' token
./src/os.h:237: error: syntax error before '*' token
./src/os.h:238: error: syntax error before '*' token
./src/os.h:239: error: syntax error before '*' token
./src/os.h:240: error: syntax error before '*' token
./src/os.h:241: error: syntax error before '*' token
./src/os.h:242: error: syntax error before '*' token
./src/os.h:244: error: syntax error before '*' token
./src/os.h:245: error: syntax error before '*' token
./src/os.h:250: error: syntax error before '*' token
./src/os.h:251: error: syntax error before '*' token
./src/os.h:252: error: syntax error before '*' token
./src/os.h:253: error: syntax error before '*' token
./src/os.h:260: error: syntax error before '*' token
./src/os.h:261: error: syntax error before '*' token
./src/os.h:262: error: syntax error before '*' token
./src/os.h:268: error: syntax error before '*' token
./src/os.h:269: error: syntax error before '*' token
In file included from ./src/alter.c:15:
./src/sqliteInt.h:690: error: syntax error before "sqlite3"
./src/sqliteInt.h:690: warning: no semicolon at end of struct or union
./src/sqliteInt.h:794: error: syntax error before "sqlite3_vfs"
./src/sqliteInt.h:794: warning: no semicolon at end of struct or union
./src/sqliteInt.h:810: error: syntax error before "lastRowid"
./src/sqliteInt.h:810: warning: data definition has no type or storage
class
./src/sqliteInt.h:814: error: syntax error before '*' token
./src/sqliteInt.h:814: warning: data definition has no type or storage
class
./src/sqliteInt.h:815: error: `SQLITE_LIMIT_TRIGGER_DEPTH' undeclared
here (not
in a function)
./src/sqliteInt.h:829: error: syntax error before "u64"
./src/sqliteInt.h:836: error: syntax error before "sqlite_int64"
./src/sqliteInt.h:837: error: syntax error before "sqlite3"
./src/sqliteInt.h:838: error: syntax error before "sqlite3"
./src/sqliteInt.h:840: error: syntax error before '*' token
./src/sqliteInt.h:840: warning: data definition has no type or storage
class
./src/sqliteInt.h:874: error: syntax error before "nDeferredCons"
./src/sqliteInt.h:874: warning: data definition has no type or storage
class
./src/sqliteInt.h:956: error: syntax error before '*' token
./src/sqliteInt.h:957: error: syntax error before '*' token
./src/sqliteInt.h:958: error: syntax error before '*' token
./src/sqliteInt.h:1019: error: syntax error before "i64"
./src/sqliteInt.h:1019: warning: no semicolon at end of struct or
union
./src/sqliteInt.h:1021: error: syntax error before '}' token
./src/sqliteInt.h:1038: warning: no semicolon at end of struct or
union
./src/sqliteInt.h:1038: error: syntax error before '*' token
./src/sqliteInt.h:1042: error: syntax error before '}' token
./src/sqliteInt.h:1185: error: syntax error before "sqlite3"
./src/sqliteInt.h:1185: warning: no semicolon at end of struct or
union
./src/sqliteInt.h:1187: error: syntax error before '*' token
./src/sqliteInt.h:1187: error: conflicting types for 'pVtab'
./src/vdbe.h:60: error: previous declaration of 'pVtab' was here
./src/sqliteInt.h:1187: warning: data definition has no type or
storage class
./src/sqliteInt.h:1189: error: conflicting types for 'pNext'
./src/sqliteInt.h:1020: error: previous declaration of 'pNext' was
here
./src/sqliteInt.h:1190: error: syntax error before '}' token
./src/sqliteInt.h:1223: error: syntax error before "sqlite3"
./src/sqliteInt.h:1223: warning: no semicolon at end of struct or
union
./src/sqliteInt.h:1224: error: conflicting types for 'zName'
./src/sqliteInt.h:1039: error: previous declaration of 'zName' was
here
./src/sqliteInt.h:1231: error: conflicting types for 'nRef'
./src/sqliteInt.h:1188: error: previous declaration of 'nRef' was here
./src/sqliteInt.h:1250: error: syntax error before '}' token
./src/sqliteInt.h:1359: error: syntax error before "sqlite3"
./src/sqliteInt.h:1359: warning: no semicolon at end of struct or
union
./src/sqliteInt.h:1364: error: syntax error before '}' token
./src/sqliteInt.h:1384: error: syntax error before "i64"
./src/sqliteInt.h:1384: warning: no semicolon at end of struct or
union
./src/sqliteInt.h:1386: error: syntax error before '}' token
./src/sqliteInt.h:1761: error: syntax error before "Bitmask"
./src/sqliteInt.h:1761: warning: data definition has no type or
storage class
./src/sqliteInt.h:1799: error: syntax error before "Bitmask"
./src/sqliteInt.h:1799: warning: no semicolon at end of struct or
union
./src/sqliteInt.h:1799: warning: no semicolon at end of struct or
union
./src/sqliteInt.h:1802: error: syntax error before '}' token
./src/sqliteInt.h:1802: warning: data definition has no type or
storage class
./src/sqliteInt.h:1803: error: syntax error before '}' token
./src/sqliteInt.h:1837: error: syntax error before
"sqlite3_index_info"
./src/sqliteInt.h:1837: warning: no semicolon at end of struct or
union
./src/sqliteInt.h:1837: warning: no semicolon at end of struct or
union
./src/sqliteInt.h:1838: warning: data definition has no type or
storage class
./src/sqliteInt.h:1839: error: syntax error before '}' token
./src/sqliteInt.h:1855: error: field `plan' has incomplete type
./src/sqliteInt.h:1882: error: syntax error before
"sqlite3_index_info"
./src/sqliteInt.h:1882: warning: no semicolon at end of struct or
union
./src/sqliteInt.h:1915: error: field `a' has incomplete type
./src/sqliteInt.h:2102: error: syntax error before "sqlite3"
./src/sqliteInt.h:2102: warning: no semicolon at end of struct or
union
./src/sqliteInt.h:2185: error: syntax error before '}' token
./src/sqliteInt.h:2320: error: syntax error before "sqlite3"
./src/sqliteInt.h:2320: warning: no semicolon at end of struct or
union
./src/sqliteInt.h:2329: error: syntax error before '}' token
./src/sqliteInt.h:2336: error: syntax error before "sqlite3"
./src/sqliteInt.h:2336: warning: no semicolon at end of struct or
union
./src/sqliteInt.h:2340: error: syntax error before '}' token
./src/sqliteInt.h:2340: warning: data definition has no type or
storage class
./src/sqliteInt.h:2354: error: syntax error before
"sqlite3_mem_methods"
./src/sqliteInt.h:2354: warning: no semicolon at end of struct or
union
./src/sqliteInt.h:2355: error: conflicting types for 'mutex'
./src/sqliteInt.h:814: error: previous declaration of 'mutex' was here
./src/sqliteInt.h:2355: warning: data definition has no type or
storage class
./src/sqliteInt.h:2356: error: syntax error before "pcache"
./src/sqliteInt.h:2356: warning: data definition has no type or
storage class
./src/sqliteInt.h:2375: error: syntax error before '*' token
./src/sqliteInt.h:2375: warning: data definition has no type or
storage class
./src/sqliteInt.h:2377: error: syntax error before '}' token
./src/sqliteInt.h:2474: error: syntax error before '*' token
./src/sqliteInt.h:2475: error: syntax error before '*' token
./src/sqliteInt.h:2476: error: syntax error before '*' token
./src/sqliteInt.h:2477: error: syntax error before '*' token
./src/sqliteInt.h:2479: error: syntax error before '*' token
./src/sqliteInt.h:2480: error: syntax error before '*' token
./src/sqliteInt.h:2481: error: syntax error before '*' token
./src/sqliteInt.h:2483: error: syntax error before '*' token
./src/sqliteInt.h:2490: error: syntax error before "sqlite3_int64"
./src/sqliteInt.h:2490: error: syntax error before "sqlite3_int64"
./src/sqliteInt.h:2519: error: syntax error before '*' token
./src/sqliteInt.h:2519: warning: data definition has no type or
storage class
./src/sqliteInt.h:2520: error: syntax error before '*' token
./src/sqliteInt.h:2520: warning: data definition has no type or
storage class
./src/sqliteInt.h:2535: error: syntax error before '*' token
./src/sqliteInt.h:2536: error: syntax error before '*' token
./src/sqliteInt.h:2537: error: syntax error before '*' token
./src/sqliteInt.h:2544: error: syntax error before "sqlite3"
./src/sqliteInt.h:2555: error: syntax error before '*' token
./src/sqliteInt.h:2556: error: syntax error before '*' token
./src/sqliteInt.h:2557: error: syntax error before '*' token
./src/sqliteInt.h:2559: error: syntax error before '*' token
./src/sqliteInt.h:2562: error: syntax error before '*' token
./src/sqliteInt.h:2566: error: syntax error before '*' token
./src/sqliteInt.h:2567: error: syntax error before '*' token
./src/sqliteInt.h:2570: error: syntax error before '*' token
./src/sqliteInt.h:2572: error: syntax error before '*' token
./src/sqliteInt.h:2593: error: syntax error before '*' token
./src/sqliteInt.h:2595: error: syntax error before "i64"
./src/sqliteInt.h:2596: error: syntax error before "i64"
./src/sqliteInt.h:2597: error: syntax error before "i64"
./src/sqliteInt.h:2617: error: syntax error before '*' token
./src/sqliteInt.h:2618: error: syntax error before '*' token
./src/sqliteInt.h:2620: error: syntax error before '*' token
./src/sqliteInt.h:2621: error: syntax error before '*' token
./src/sqliteInt.h:2628: error: syntax error before '*' token
./src/sqliteInt.h:2629: error: syntax error before '*' token
./src/sqliteInt.h:2636: error: syntax error before '*' token
./src/sqliteInt.h:2665: error: syntax error before '*' token
./src/sqliteInt.h:2667: error: syntax error before '*' token
./src/sqliteInt.h:2668: error: syntax error before '*' token
./src/sqliteInt.h:2669: error: syntax error before '*' token
./src/sqliteInt.h:2671: error: syntax error before "sqlite3"
./src/sqliteInt.h:2672: error: syntax error before '*' token
./src/sqliteInt.h:2680: error: syntax error before '*' token
./src/sqliteInt.h:2686: error: syntax error before '*' token
./src/sqliteInt.h:2706: error: syntax error before '*' token
./src/sqliteInt.h:2707: error: syntax error before '*' token
./src/sqliteInt.h:2708: error: syntax error before '*' token
./src/sqliteInt.h:2709: error: syntax error before '*' token
./src/sqliteInt.h:2710: error: syntax error before '*' token
./src/sqliteInt.h:2712: error: syntax error before '*' token
./src/sqliteInt.h:2713: error: syntax error before '*' token
./src/sqliteInt.h:2723: error: syntax error before '*' token
./src/sqliteInt.h:2724: error: syntax error before '*' token
./src/sqliteInt.h:2743: error: syntax error before '*' token
./src/sqliteInt.h:2744: error: syntax error before '*' token
./src/sqliteInt.h:2745: error: syntax error before '*' token
./src/sqliteInt.h:2747: error: syntax error before '*' token
./src/sqliteInt.h:2748: error: syntax error before '*' token
./src/sqliteInt.h:2749: error: syntax error before '*' token
./src/sqliteInt.h:2750: error: syntax error before '*' token
./src/sqliteInt.h:2782: error: syntax error before '*' token
./src/sqliteInt.h:2804: error: syntax error before "u64"
./src/sqliteInt.h:2806: error: syntax error before "u64"
./src/sqliteInt.h:2808: error: syntax error before "v"
./src/sqliteInt.h:2838: error: syntax error before "i64"
./src/sqliteInt.h:2839: error: syntax error before '*' token
./src/sqliteInt.h:2840: error: syntax error before '*' token
./src/sqliteInt.h:2844: error: syntax error before '*' token
./src/sqliteInt.h:2850: error: syntax error before '*' token
./src/sqliteInt.h:2852: error: syntax error before '*' token
./src/sqliteInt.h:2853: error: syntax error before '*' token
./src/sqliteInt.h:2854: error: syntax error before '*' token
./src/sqliteInt.h:2855: error: syntax error before ')' token
./src/sqliteInt.h:2856: error: syntax error before '*' token
./src/sqliteInt.h:2857: error: syntax error before '*' token
./src/sqliteInt.h:2857: error: syntax error before '*' token
./src/sqliteInt.h:2857: warning: data definition has no type or
storage class
./src/sqliteInt.h:2858: error: syntax error before '*' token
./src/sqliteInt.h:2862: error: syntax error before '*' token
./src/sqliteInt.h:2863: error: syntax error before '*' token
./src/sqliteInt.h:2874: error: syntax error before '*' token
./src/sqliteInt.h:2878: error: syntax error before '*' token
./src/sqliteInt.h:2887: error: syntax error before '*' token
./src/sqliteInt.h:2891: error: syntax error before '*' token
./src/sqliteInt.h:2892: error: syntax error before '*' token
./src/sqliteInt.h:2893: error: syntax error before '*' token
./src/sqliteInt.h:2896: error: syntax error before '*' token
./src/sqliteInt.h:2897: error: syntax error before '*' token
./src/sqliteInt.h:2900: error: syntax error before '*' token
./src/sqliteInt.h:2901: error: syntax error before '*' token
./src/sqliteInt.h:2903: error: syntax error before '*' token
./src/sqliteInt.h:2904: error: syntax error before '*' token
./src/sqliteInt.h:2904: error: `sqlite3CreateFunc' declared as
function returnin
g a function
./src/sqliteInt.h:2906: error: syntax error before '*' token
./src/sqliteInt.h:2914: error: syntax error before '*' token
./src/sqliteInt.h:2916: error: syntax error before '*' token
./src/sqliteInt.h:2917: error: syntax error before '*' token
./src/sqliteInt.h:2929: error: syntax error before '*' token
./src/sqliteInt.h:2957: error: syntax error before '*' token
./src/sqliteInt.h:2958: error: syntax error before '*' token
./src/sqliteInt.h:2959: error: syntax error before '*' token
./src/sqliteInt.h:2962: error: syntax error before '*' token
./src/sqliteInt.h:2970: error: syntax error before '*' token
./src/sqliteInt.h:2972: error: syntax error before '*' token
./src/sqliteInt.h:2973: error: syntax error before '*' token
./src/sqliteInt.h:2974: error: syntax error before '*' token
./src/sqliteInt.h:2975: error: syntax error before '*' token
./src/sqliteInt.h:2977: error: syntax error before '*' token
./src/sqliteInt.h:2981: error: syntax error before '*' token
./src/sqliteInt.h:2982: error: syntax error before '*' token
./src/sqliteInt.h:3044: error: syntax error before '*' token
./src/sqliteInt.h:3046: error: syntax error before '*' token
./src/alter.c:38: error: syntax error before '*' token
./src/alter.c: In function `renameTableFunc':
./src/alter.c:42: error: `argv' undeclared (first use in this
function)
./src/alter.c:42: error: (Each undeclared identifier is reported only
once
./src/alter.c:42: error: for each function it appears in.)
./src/alter.c:42: warning: initialization makes pointer from integer
without a c
ast
./src/alter.c:43: warning: initialization makes pointer from integer
without a c
ast
./src/alter.c:51: error: `sqlite3' undeclared (first use in this
function)
./src/alter.c:51: error: `db' undeclared (first use in this function)
./src/alter.c:51: error: `context' undeclared (first use in this
function)
./src/alter.c:53: error: `NotUsed' undeclared (first use in this
function)
./src/alter.c:82: error: `sqlite3_destructor_type' undeclared (first
use in this
function)
./src/alter.c:82: error: syntax error before "sqlite3DbFree"
./src/alter.c: At top level:
./src/alter.c:103: error: syntax error before '*' token
./src/alter.c: In function `renameParentFunc':
./src/alter.c:107: error: `sqlite3' undeclared (first use in this
function)
./src/alter.c:107: error: `db' undeclared (first use in this function)
./src/alter.c:107: error: `context' undeclared (first use in this
function)
./src/alter.c:110: error: `argv' undeclared (first use in this
function)
./src/alter.c:110: warning: initialization makes pointer from integer
without a
cast
./src/alter.c:111: warning: initialization makes pointer from integer
without a
cast
./src/alter.c:112: warning: initialization makes pointer from integer
without a
cast
./src/alter.c:118: error: `NotUsed' undeclared (first use in this
function)
./src/alter.c:144: error: `sqlite3_destructor_type' undeclared (first
use in thi
s function)
./src/alter.c:144: error: syntax error before "sqlite3DbFree"
./src/alter.c: At top level:
./src/alter.c:158: error: syntax error before '*' token
./src/alter.c: In function `renameTriggerFunc':
./src/alter.c:162: error: `argv' undeclared (first use in this
function)
./src/alter.c:162: warning: initialization makes pointer from integer
without a
cast
./src/alter.c:163: warning: initialization makes pointer from integer
without a
cast
./src/alter.c:171: error: `sqlite3' undeclared (first use in this
function)
./src/alter.c:171: error: `db' undeclared (first use in this function)
./src/alter.c:171: error: `context' undeclared (first use in this
function)
./src/alter.c:173: error: `NotUsed' undeclared (first use in this
function)
./src/alter.c:221: error: `sqlite3_destructor_type' undeclared (first
use in thi
s function)
./src/alter.c:221: error: syntax error before "sqlite3DbFree"
./src/alter.c: At top level:
./src/alter.c:229: error: syntax error before '*' token
./src/alter.c: In function `sqlite3AlterFunctions':
./src/alter.c:230: error: `db' undeclared (first use in this function)
./src/alter.c:230: error: `SQLITE_UTF8' undeclared (first use in this
function)
./src/alter.c: At top level:
./src/alter.c:258: error: syntax error before '*' token
./src/alter.c: In function `whereOrName':
./src/alter.c:260: error: `zWhere' undeclared (first use in this
function)
./src/alter.c:261: error: `db' undeclared (first use in this function)
./src/alter.c:261: error: `zConstant' undeclared (first use in this
function)
./src/alter.c: In function `whereForeignKeys':
./src/alter.c:280: error: dereferencing pointer to incomplete type
./src/alter.c:280: error: dereferencing pointer to incomplete type
./src/alter.c: In function `whereTempTriggers':
./src/alter.c:295: error: dereferencing pointer to incomplete type
./src/alter.c:302: error: dereferencing pointer to incomplete type
./src/alter.c:303: error: `sqlite3' undeclared (first use in this
function)
./src/alter.c:303: error: `db' undeclared (first use in this function)
./src/alter.c:303: error: dereferencing pointer to incomplete type
./src/alter.c: In function `reloadTableSchema':
./src/alter.c:332: error: dereferencing pointer to incomplete type
./src/alter.c:332: error: dereferencing pointer to incomplete type
./src/alter.c:338: error: dereferencing pointer to incomplete type
./src/alter.c:345: error: dereferencing pointer to incomplete type
./src/alter.c:348: error: dereferencing pointer to incomplete type
./src/alter.c: In function `sqlite3AlterRenameTable':
./src/alter.c:375: error: `sqlite3' undeclared (first use in this
function)
./src/alter.c:375: error: `db' undeclared (first use in this function)
./src/alter.c:375: error: dereferencing pointer to incomplete type
./src/alter.c:388: error: dereferencing pointer to incomplete type
./src/alter.c:388: error: dereferencing pointer to incomplete type
./src/alter.c:390: error: dereferencing pointer to incomplete type
./src/alter.c:390: error: dereferencing pointer to incomplete type
./src/alter.c:409: error: dereferencing pointer to incomplete type
./src/alter.c:410: error: dereferencing pointer to incomplete type
./src/alter.c:412: error: dereferencing pointer to incomplete type
./src/alter.c:415: error: `SQLITE_OK' undeclared (first use in this
function)
./src/alter.c:420: error: dereferencing pointer to incomplete type
./src/alter.c:421: error: dereferencing pointer to incomplete type
./src/alter.c:428: error: `SQLITE_ALTER_TABLE' undeclared (first use
in this fun
ction)
./src/alter.c:428: error: dereferencing pointer to incomplete type
./src/alter.c:437: error: dereferencing pointer to incomplete type
./src/alter.c:439: error: dereferencing pointer to incomplete type
./src/alter.c:464: error: dereferencing pointer to incomplete type
./src/alter.c:472: error: dereferencing pointer to incomplete type
./src/alter.c:522: error: dereferencing pointer to incomplete type
./src/alter.c:547: error: dereferencing pointer to incomplete type
./src/alter.c: In function `sqlite3AlterFinishAddColumn':
./src/alter.c:604: error: `sqlite3' undeclared (first use in this
function)
./src/alter.c:604: error: `db' undeclared (first use in this function)
./src/alter.c:606: error: dereferencing pointer to incomplete type
./src/alter.c:607: error: dereferencing pointer to incomplete type
./src/alter.c:608: error: dereferencing pointer to incomplete type
./src/alter.c:612: error: dereferencing pointer to incomplete type
./src/alter.c:614: error: dereferencing pointer to incomplete type
./src/alter.c:615: error: dereferencing pointer to incomplete type
./src/alter.c:615: error: dereferencing pointer to incomplete type
./src/alter.c:622: error: `SQLITE_ALTER_TABLE' undeclared (first use
in this fun
ction)
./src/alter.c:622: error: dereferencing pointer to incomplete type
./src/alter.c:643: error: dereferencing pointer to incomplete type
./src/alter.c:647: error: dereferencing pointer to incomplete type
./src/alter.c:662: error: `sqlite3_value' undeclared (first use in
this function
)
./src/alter.c:662: error: `pVal' undeclared (first use in this
function)
./src/alter.c:663: error: `SQLITE_UTF8' undeclared (first use in this
function)
./src/alter.c:685: error: dereferencing pointer to incomplete type
./src/alter.c:685: error: dereferencing pointer to incomplete type
./src/alter.c:698: error: dereferencing pointer to incomplete type
./src/alter.c: In function `sqlite3AlterBeginAddColumn':
./src/alter.c:723: error: `sqlite3' undeclared (first use in this
function)
./src/alter.c:723: error: `db' undeclared (first use in this function)
./src/alter.c:723: error: dereferencing pointer to incomplete type
./src/alter.c:729: error: dereferencing pointer to incomplete type
./src/alter.c:729: error: dereferencing pointer to incomplete type
./src/alter.c:733: error: dereferencing pointer to incomplete type
./src/alter.c:740: error: dereferencing pointer to incomplete type
./src/alter.c:746: error: dereferencing pointer to incomplete type
./src/alter.c:755: error: invalid application of `sizeof' to
incomplete type `./
src/sqliteInt.h'
./src/alter.c:757: error: dereferencing pointer to incomplete type
./src/alter.c:758: error: dereferencing pointer to incomplete type
./src/alter.c:759: error: dereferencing pointer to incomplete type
./src/alter.c:759: error: dereferencing pointer to incomplete type
./src/alter.c:760: error: dereferencing pointer to incomplete type
./src/alter.c:760: error: dereferencing pointer to incomplete type
./src/alter.c:762: error: dereferencing pointer to incomplete type
./src/alter.c:764: error: dereferencing pointer to incomplete type
./src/alter.c:765: error: dereferencing pointer to incomplete type
./src/alter.c:765: error: dereferencing pointer to incomplete type
./src/alter.c:766: error: dereferencing pointer to incomplete type
./src/alter.c:766: error: dereferencing pointer to incomplete type
./src/alter.c:770: error: dereferencing pointer to incomplete type
./src/alter.c:770: error: dereferencing pointer to incomplete type
./src/alter.c:770: error: dereferencing pointer to incomplete type
./src/alter.c:771: error: dereferencing pointer to incomplete type
./src/alter.c:772: error: dereferencing pointer to incomplete type
./src/alter.c:779: error: dereferencing pointer to incomplete type
./src/alter.c:780: error: dereferencing pointer to incomplete type
./src/alter.c:780: error: dereferencing pointer to incomplete type
./src/alter.c:781: error: dereferencing pointer to incomplete type
./src/alter.c: At top level:
./src/sqliteInt.h:815: error: storage size of `aLimit' isn't known
make: *** [alter.lo] Error 1

Can't you help me? What's wrong now?

Stephen Lombardo

unread,
Mar 25, 2010, 12:40:06 PM3/25/10
to sqlc...@googlegroups.com
Ilya,

The problem is that the first time you ran make build of sqlite3.h failed because of the tcl dependency. the SQlite makefile will not rebuild sqlite3.h if it is present, but the file is probably empty. Try:

rm sqlite3.h

Then run make again.

Cheers,
Stephen

illuk

unread,
Mar 26, 2010, 6:03:33 AM3/26/10
to SQLCipher Users
Hi, Stephen and thank you very much for a great help! It compilled now
so i have exe & dll files.
It was a problem when 'make dll' but this helped:

./configure --disable-tcl --disable-amalgamation CFLAGS="-

DSQLITE_HAS_CODE -I/c/OpenSSL/include -leay32 -L/c/OpenSSL/lib"
make
make dll

It's working now but i can't encrypt anything. Here is what i've done:

C:\sqlite>sqlite3 new.db
SQLite version 3.6.21
Enter ".help" for instructions
Enter SQL statements terminated with a ";"
sqlite> pragma key = '1234567';
sqlite> create table a(b int);
sqlite> insert into a values(1);
sqlite> insert into a values(2);
sqlite> insert into a values(3);
sqlite> .exit

C:\sqlite>sqlite3 new.db
SQLite version 3.6.21
Enter ".help" for instructions
Enter SQL statements terminated with a ";"
sqlite> select * from a;
1
2
3


So no key inputed but my data is still acessable... What have i done
wrong?

> ...
>
> read more »

Stephen Lombardo

unread,
Mar 26, 2010, 9:12:25 AM3/26/10
to sqlc...@googlegroups.com
Hi Ilya,

It looks like the problem may be with your CFLAGS variable, since you have set -DSQLITE_HAS_CODE instead of -DSQLITE_HAS_CODEC. If SQLITE_HAS_CODEC isn't defined at build time the system complies as the standard sqlite and PRAGMA key will have no effect. Try the following and see if it works.

./configure --disable-tcl --disable-amalgamation CFLAGS="-DSQLITE_HAS_CODEC -I/c/OpenSSL/include -leay32 -L/c/OpenSSL/lib"
make
make dll

Cheers,
Stephen

illuk

unread,
Mar 26, 2010, 12:49:05 PM3/26/10
to SQLCipher Users
All is great!!! And THANK YOU VERY VERY MUCH!!! Without your help my
project will be failed!
I want to do something good for you. For example, would it be usefull
for you if i write a gide of "how to compile sqlcipher" for windows?

Billy Gray

unread,
Mar 26, 2010, 1:35:39 PM3/26/10
to sqlc...@googlegroups.com
Hi Ilya, 

That's great news!

If you have the time to put together such a how-to guide for compiling with MinGW/MSYS, I would gladly add it to the github wiki for SQLCipher.

Regards,
Billy

To unsubscribe from this group, send email to sqlcipher+unsubscribegooglegroups.com or reply to this email with the words "REMOVE ME" as the subject.



--
Billy Gray
http://zetetic.net

Yogi

unread,
Apr 23, 2010, 1:40:35 AM4/23/10
to SQLCipher Users
Hi all.

I can not make SQL Chiper, gives these errors:
...
./src/sqliteInt.h:1837: warning: no semicolon at end of struct or
union
./src/sqliteInt.h:1837: warning: no semicolon at end of struct or
union
./src/sqliteInt.h:1838: warning: data definition has no type or
storage class
./src/sqliteInt.h:1839: error: syntax error before '}' token
./src/sqliteInt.h:1855: error: field `plan' has incomplete type
./src/sqliteInt.h:1882: error: syntax error before
"sqlite3_index_info"
./src/sqliteInt.h:1882: warning: no semicolon at end of struct or
union
./src/sqliteInt.h:1915: error: field `a' has incomplete type
./src/sqliteInt.h:2102: error: syntax error before "sqlite3"
./src/sqliteInt.h:2102: warning: no semicolon at end of struct or
union
./src/sqliteInt.h:2185: error: syntax error before '}' token
./src/sqliteInt.h:2320: error: syntax error before "sqlite3"
./src/sqliteInt.h:2320: warning: no semicolon at end of struct or
union
./src/sqliteInt.h:2329: error: syntax error before '}' token
./src/sqliteInt.h:2336: error: syntax error before "sqlite3"
./src/sqliteInt.h:2336: warning: no semicolon at end of struct or
union
./src/sqliteInt.h:2340: error: syntax error before '}' token
./src/sqliteInt.h:2340: warning: data definition has no type or
storage class
./src/sqliteInt.h:2354: error: syntax error before
"sqlite3_mem_methods"
./src/sqliteInt.h:2354: warning: no semicolon at end of struct or
union
./src/sqliteInt.h:2355: error: conflicting types for 'mutex'
./src/sqliteInt.h:814: error: previous declaration of 'mutex' was here
./src/sqliteInt.h:2355: warning: data definition has no type or
storage class
./src/sqliteInt.h:2356: error: syntax error before "pcache"
./src/sqliteInt.h:2356: warning: data definition has no type or
storage class
./src/sqliteInt.h:2375: error: syntax error before '*' token
./src/sqliteInt.h:2375: warning: data definition has no type or
storage class
./src/sqliteInt.h:2377: error: syntax error before '}' token
./src/sqliteInt.h:2474: error: syntax error before '*' token
./src/sqliteInt.h:2475: error: syntax error before '*' token
./src/sqliteInt.h:2476: error: syntax error before '*' token
./src/sqliteInt.h:2477: error: syntax error before '*' token
./src/sqliteInt.h:2479: error: syntax error before '*' token
./src/sqliteInt.h:2480: error: syntax error before '*' token
./src/sqliteInt.h:2481: error: syntax error before '*' token
./src/sqliteInt.h:2483: error: syntax error before '*' token
./src/sqliteInt.h:2490: error: syntax error before "sqlite3_int64"
./src/sqliteInt.h:2490: error: syntax error before "sqlite3_int64"
./src/sqliteInt.h:2519: error: syntax error before '*' token
./src/sqliteInt.h:2519: warning: data definition has no type or
storage class
./src/sqliteInt.h:2520: error: syntax error before '*' token
./src/sqliteInt.h:2520: warning: data definition has no type or
storage class
./src/sqliteInt.h:2535: error: syntax error before '*' token
./src/sqliteInt.h:2536: error: syntax error before '*' token
./src/sqliteInt.h:2537: error: syntax error before '*' token
./src/sqliteInt.h:2544: error: syntax error before "sqlite3"
./src/sqliteInt.h:2555: error: syntax error before '*' token
./src/sqliteInt.h:2556: error: syntax error before '*' token
./src/sqliteInt.h:2557: error: syntax error before '*' token
./src/sqliteInt.h:2559: error: syntax error before '*' token
./src/sqliteInt.h:2562: error: syntax error before '*' token
./src/sqliteInt.h:2566: error: syntax error before '*' token
./src/sqliteInt.h:2567: error: syntax error before '*' token
./src/sqliteInt.h:2570: error: syntax error before '*' token
./src/sqliteInt.h:2572: error: syntax error before '*' token
./src/sqliteInt.h:2593: error: syntax error before '*' token
./src/sqliteInt.h:2595: error: syntax error before "i64"
./src/sqliteInt.h:2596: error: syntax error before "i64"
./src/sqliteInt.h:2597: error: syntax error before "i64"
./src/sqliteInt.h:2617: error: syntax error before '*' token
./src/sqliteInt.h:2618: error: syntax error before '*' token
./src/sqliteInt.h:2620: error: syntax error before '*' token
./src/sqliteInt.h:2621: error: syntax error before '*' token
./src/sqliteInt.h:2628: error: syntax error before '*' token
./src/sqliteInt.h:2629: error: syntax error before '*' token
./src/sqliteInt.h:2636: error: syntax error before '*' token
./src/sqliteInt.h:2665: error: syntax error before '*' token
./src/sqliteInt.h:2667: error: syntax error before '*' token
./src/sqliteInt.h:2668: error: syntax error before '*' token
./src/sqliteInt.h:2669: error: syntax error before '*' token
./src/sqliteInt.h:2671: error: syntax error before "sqlite3"
./src/sqliteInt.h:2672: error: syntax error before '*' token
./src/sqliteInt.h:2680: error: syntax error before '*' token
./src/sqliteInt.h:2686: error: syntax error before '*' token
./src/sqliteInt.h:2706: error: syntax error before '*' token
./src/sqliteInt.h:2707: error: syntax error before '*' token
./src/sqliteInt.h:2708: error: syntax error before '*' token
./src/sqliteInt.h:2709: error: syntax error before '*' token
./src/sqliteInt.h:2710: error: syntax error before '*' token
./src/sqliteInt.h:2712: error: syntax error before '*' token
./src/sqliteInt.h:2713: error: syntax error before '*' token
./src/sqliteInt.h:2723: error: syntax error before '*' token
./src/sqliteInt.h:2724: error: syntax error before '*' token
./src/sqliteInt.h:2743: error: syntax error before '*' token
./src/sqliteInt.h:2744: error: syntax error before '*' token
./src/sqliteInt.h:2745: error: syntax error before '*' token
./src/sqliteInt.h:2747: error: syntax error before '*' token
./src/sqliteInt.h:2748: error: syntax error before '*' token
./src/sqliteInt.h:2749: error: syntax error before '*' token
./src/sqliteInt.h:2750: error: syntax error before '*' token
./src/sqliteInt.h:2782: error: syntax error before '*' token
./src/sqliteInt.h:2804: error: syntax error before "u64"
./src/sqliteInt.h:2806: error: syntax error before "u64"
./src/sqliteInt.h:2808: error: syntax error before "v"
./src/sqliteInt.h:2838: error: syntax error before "i64"
./src/sqliteInt.h:2839: error: syntax error before '*' token
./src/sqliteInt.h:2840: error: syntax error before '*' token
./src/sqliteInt.h:2844: error: syntax error before '*' token
./src/sqliteInt.h:2850: error: syntax error before '*' token
./src/sqliteInt.h:2852: error: syntax error before '*' token
./src/sqliteInt.h:2853: error: syntax error before '*' token
./src/sqliteInt.h:2854: error: syntax error before '*' token
./src/sqliteInt.h:2855: error: syntax error before ')' token
./src/sqliteInt.h:2856: error: syntax error before '*' token
./src/sqliteInt.h:2857: error: syntax error before '*' token
./src/sqliteInt.h:2857: error: syntax error before '*' token
./src/sqliteInt.h:2857: warning: data definition has no type or
storage class
./src/sqliteInt.h:2858: error: syntax error before '*' token
./src/sqliteInt.h:2862: error: syntax error before '*' token
./src/sqliteInt.h:2863: error: syntax error before '*' token
./src/sqliteInt.h:2874: error: syntax error before '*' token
./src/sqliteInt.h:2878: error: syntax error before '*' token
./src/sqliteInt.h:2887: error: syntax error before '*' token
./src/sqliteInt.h:2891: error: syntax error before '*' token
./src/sqliteInt.h:2892: error: syntax error before '*' token
./src/sqliteInt.h:2893: error: syntax error before '*' token
./src/sqliteInt.h:2896: error: syntax error before '*' token
./src/sqliteInt.h:2897: error: syntax error before '*' token
./src/sqliteInt.h:2900: error: syntax error before '*' token
./src/sqliteInt.h:2901: error: syntax error before '*' token
./src/sqliteInt.h:2903: error: syntax error before '*' token
./src/sqliteInt.h:2904: error: syntax error before '*' token
./src/sqliteInt.h:2904: error: `sqlite3CreateFunc' declared as
function returnin
g a function
./src/sqliteInt.h:2906: error: syntax error before '*' token
./src/sqliteInt.h:2914: error: syntax error before '*' token
./src/sqliteInt.h:2916: error: syntax error before '*' token
./src/sqliteInt.h:2917: error: syntax error before '*' token
./src/sqliteInt.h:2929: error: syntax error before '*' token
./src/sqliteInt.h:2957: error: syntax error before '*' token
./src/sqliteInt.h:2958: error: syntax error before '*' token
./src/sqliteInt.h:2959: error: syntax error before '*' token
./src/sqliteInt.h:2962: error: syntax error before '*' token
./src/sqliteInt.h:2970: error: syntax error before '*' token
./src/sqliteInt.h:2972: error: syntax error before '*' token
./src/sqliteInt.h:2973: error: syntax error before '*' token
./src/sqliteInt.h:2974: error: syntax error before '*' token
./src/sqliteInt.h:2975: error: syntax error before '*' token
./src/sqliteInt.h:2977: error: syntax error before '*' token
./src/sqliteInt.h:2981: error: syntax error before '*' token
./src/sqliteInt.h:2982: error: syntax error before '*' token
./src/sqliteInt.h:3044: error: syntax error before '*' token
./src/sqliteInt.h:3046: error: syntax error before '*' token
./src/alter.c:38: error: syntax error before '*' token
./src/alter.c: In function `renameTableFunc':
./src/alter.c:42: error: `argv' undeclared (first use in this
function)
./src/alter.c:42: error: (Each undeclared identifier is reported only
once
./src/alter.c:42: error: for each function it appears in.)
./src/alter.c:42: warning: initialization makes pointer from integer
without a c
ast
./src/alter.c:43: warning: initialization makes pointer from integer
without a c
ast
./src/alter.c:51: error: `sqlite3' undeclared (first use in this
function)
./src/alter.c:51: error: `db' undeclared (first use in this function)
./src/alter.c:51: error: `context' undeclared (first use in this
function)
./src/alter.c:53: error: `NotUsed' undeclared (first use in this
function)
./src/alter.c:82: error: `sqlite3_destructor_type' undeclared (first
use in this
function)
./src/alter.c:82: error: syntax error before "sqlite3DbFree"
./src/alter.c: At top level:
./src/alter.c:103: error: syntax error before '*' token
./src/alter.c: In function `renameParentFunc':
./src/alter.c:107: error: `sqlite3' undeclared (first use in this
function)
./src/alter.c:107: error: `db' undeclared (first use in this function)
./src/alter.c:107: error: `context' undeclared (first use in this
function)
./src/alter.c:110: error: `argv' undeclared (first use in this
function)
./src/alter.c:110: warning: initialization makes pointer from integer
without a
cast
./src/alter.c:111: warning: initialization makes pointer from integer
without a
cast
./src/alter.c:112: warning: initialization makes pointer from integer
without a
cast
./src/alter.c:118: error: `NotUsed' undeclared (first use in this
function)
./src/alter.c:144: error: `sqlite3_destructor_type' undeclared (first
use in thi
s function)
./src/alter.c:144: error: syntax error before "sqlite3DbFree"
./src/alter.c: At top level:
./src/alter.c:158: error: syntax error before '*' token
./src/alter.c: In function `renameTriggerFunc':
./src/alter.c:162: error: `argv' undeclared (first use in this
function)
./src/alter.c:162: warning: initialization makes pointer from integer
without a
cast
./src/alter.c:163: warning: initialization makes pointer from integer
without a
cast
./src/alter.c:171: error: `sqlite3' undeclared (first use in this
function)
./src/alter.c:171: error: `db' undeclared (first use in this function)
./src/alter.c:171: error: `context' undeclared (first use in this
function)
./src/alter.c:173: error: `NotUsed' undeclared (first use in this
function)
./src/alter.c:221: error: `sqlite3_destructor_type' undeclared (first
use in thi
s function)
./src/alter.c:221: error: syntax error before "sqlite3DbFree"
./src/alter.c: At top level:
./src/alter.c:229: error: syntax error before '*' token
Yogi@WINXPSP3 /c/dev/src/sjlombardo-sqlcipher-e533187
$
Here is my. / Configure line:
./configure --disable-tcl --disable-amalgamation CFLAGS="-
DSQLITE_HAS_CODEС -I/c/dev/src/openssl-1.0.0/include/openssl -leay32 -
L/c/OpenSSL/"

What's wrong?

Thanks for the answers


--
Subscription settings: http://groups.google.com/group/sqlcipher/subscribe?hl=en

Игорь Богомолов

unread,
Apr 23, 2010, 5:04:03 PM4/23/10
to sqlc...@googlegroups.com
Hi Yogi 

install Win32 OpenSSL v0.9.8m
install TclTk
rename MINGWPATH/bin/tclsh84.exe  to  tclsh.exe

cd sqlcipher
$ ./configure --disable-tcl --disable-amalgamation
CFLAGS
="-DSQLITE_HAS_CODEC -I../OpenSSL/include /c/Windows/System32/libeay32.dll"
$ make
$ make dll
$ make install

Luca

unread,
Aug 12, 2012, 7:03:22 AM8/12/12
to sqlc...@googlegroups.com
In case anyone else needs to compile SQLCipher under Windows I wrote some notes here. I used cygwin and mingw. Hope it might be of help.

Luca

hari gaire

unread,
Nov 20, 2012, 11:40:01 PM11/20/12