SQLCipher with MinGW/MSYS?

Showing 1-44 of 44 messages
SQLCipher with MinGW/MSYS? Will Parsons 12/23/09 5:48 PM
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

Re: SQLCipher with MinGW/MSYS? Stephen Lombardo 12/23/09 7:30 PM
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
Re: SQLCipher with MinGW/MSYS? Will Parsons 12/24/09 5:31 AM
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.

> On Wed, Dec 23, 2009 at 8:48 PM, Will Parsons <gyli...@gmail.com> wrote:
>
> > 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

Re: SQLCipher with MinGW/MSYS? Stephen Lombardo 12/24/09 6:49 AM
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
Re: SQLCipher with MinGW/MSYS? Adriano Ribeiro 1/28/10 3:55 PM
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 Thu, Dec 24, 2009 at 8:31 AM, Will Parsons <gylia...@gmail.com> wrote:
> > 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.
>
> > On Wed, 23 Dec 2009 22:30:24 -0500
> > > On Wed, Dec 23, 2009 at 8:48 PM, Will Parsons <gylia...@gmail.com>

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

Re: SQLCipher with MinGW/MSYS? Stephen Lombardo 2/3/10 3:25 AM
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
Re: SQLCipher with MinGW/MSYS? Stephen Lombardo 2/5/10 1:10 AM
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
Re: SQLCipher with MinGW/MSYS? Yasriady 2/5/10 5:49 PM
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
>
> > On Thu, Jan 28, 2010 at 6:55 PM, Adriano Ribeiro <adribe...@gmail.com>wrote:

Re: SQLCipher with MinGW/MSYS? Stephen Lombardo 2/16/10 12:27 PM
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
Re: SQLCipher with MinGW/MSYS? Yasriady 2/21/10 11:27 PM
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
>

Re: SQLCipher with MinGW/MSYS? Yasriady 2/21/10 11:35 PM
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
>

Re: SQLCipher with MinGW/MSYS? Yasriady 2/23/10 11:13 PM
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 »

Re: SQLCipher with MinGW/MSYS? Stephen Lombardo 2/24/10 7:58 PM
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
Re: SQLCipher with MinGW/MSYS? Yasriady 2/24/10 7:58 PM
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 »

Re: SQLCipher with MinGW/MSYS? Stephen Lombardo 2/24/10 8:07 PM
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
Re: SQLCipher with MinGW/MSYS? Yasriady 2/25/10 12:37 AM
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 »

RE: SQLCipher with MinGW/MSYS? domehead100 2/25/10 6:50 AM
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

Re: SQLCipher with MinGW/MSYS? Yasriady 3/1/10 1:45 AM
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 »

Re: SQLCipher with MinGW/MSYS? Dimitri 3/23/10 4:00 PM
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 »

Re: SQLCipher with MinGW/MSYS? Stephen Lombardo 3/23/10 7:18 PM
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.

Re: SQLCipher with MinGW/MSYS? illuk 3/25/10 9:08 AM
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?

Re: SQLCipher with MinGW/MSYS? Stephen Lombardo 3/25/10 9:40 AM
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


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

Re: SQLCipher with MinGW/MSYS? illuk 3/26/10 3:03 AM
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?

On Mar 25, 7:40 pm, Stephen Lombardo <sjlomba...@zetetic.net> wrote:
> 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
>
>
>
> ...
>
> read more »

Re: SQLCipher with MinGW/MSYS? Stephen Lombardo 3/26/10 6:12 AM
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
Re: SQLCipher with MinGW/MSYS? illuk 3/26/10 9:49 AM
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?

On Mar 26, 4:12 pm, Stephen Lombardo <sjlomba...@zetetic.net> wrote:
> 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
>
>
>

Re: SQLCipher with MinGW/MSYS? Billy Gray 3/26/10 10:35 AM
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

On Fri, Mar 26, 2010 at 12:49 PM, illuk <ilya.l...@gmail.com> wrote:
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?

On Mar 26, 4:12 pm, Stephen Lombardo <sjlomba...@zetetic.net> wrote:
> 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
>
>
>
> On Fri, Mar 26, 2010 at 6:03 AM, illuk <ilya.lukya...@gmail.com> wrote:
> > 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?
>
> > On Mar 25, 7:40 pm, Stephen Lombardo <sjlomba...@zetetic.net> wrote:
> > > 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.

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
Re: SQLCipher with MinGW/MSYS? Yogi 4/22/10 10:40 PM
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
./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

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
Re: SQLCipher with MinGW/MSYS? Игорь Богомолов 4/23/10 2:04 PM
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

Re: SQLCipher with MinGW/MSYS? Luca 8/12/12 4:03 AM
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

On Thursday, December 24, 2009 2:48:58 AM UTC+1, Will Parsons wrote:
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

Re: SQLCipher with MinGW/MSYS? hari gaire 11/20/12 8:40 PM
Hi stephan,

when i try to run:
./configure --disable-tcl CFLAGS="-DSQLITE_HAS_CODEC -I/path/to/openssl/include" LDFLAGS="-leay32"

I get following error in config.log

configure:2578: checking for C compiler default output file name
configure:2600: gcc -DSQLITE_HAS_CODEC -I/c/OpenSSL-Win64/include  -leay32 conftest.c  >&5
c:/mingw/bin/../lib/gcc/mingw32/4.7.2/../../../../mingw32/bin/ld.exe: cannot find -leay32
collect2.exe: error: ld returned 1 exit status

what may be the reason ??


Thanks for the answers 

On Thursday, December 24, 2009 9:15:24 AM UTC+5:45, Stephen Lombardo wrote:
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



On Wed, Dec 23, 2009 at 8:48 PM, Will Parsons <gyli...@gmail.com> wrote:
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

Re: SQLCipher with MinGW/MSYS? Luca 11/21/12 1:40 AM
Read here. You're missing the OpenSSL it seems.

Luca
Re: SQLCipher with MinGW/MSYS? thinkthin...@gmail.com 9/3/13 1:14 AM
Hi Illuk!
Recently,I am studying sqlcipher. I have done a lot of work on compling sqlcipher under windows but I failed! I am a greener, did you write a guide of "how to compile
sqlcipher for windows"? I need it very much. I have suffered a lot. Please help me !!!!! If you can give me the latest version dll of sqlcipher ,It will be great!!!!!!!!!!
Thank you !
在 2010年3月27日星期六UTC+8上午12时49分05秒,illuk写道:
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?

On Mar 26, 4:12 pm, Stephen Lombardo <sjlomba...@zetetic.net> wrote:
> 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
>
>
>
> On Fri, Mar 26, 2010 at 6:03 AM, illuk <ilya.lukya...@gmail.com> wrote:
> > 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="-

Re: SQLCipher with MinGW/MSYS? Nick Parker 9/3/13 8:12 AM
Hi,

If you are receiving an error during compilation, please post the error
message as that would be needed to help.
> --
>  
> ---
> You received this message because you are subscribed to the Google
> Groups "SQLCipher Users" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to sqlcipher+...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.

--
Nick Parker
Re: SQLCipher with MinGW/MSYS? Sife Abdelrazak 9/23/13 11:52 PM
Hello,
Would you post the compilation error, and how did you configure you
environment before compiling sqlcipher?
Re: SQLCipher with MinGW/MSYS? Rodrigo 1/29/14 12:08 PM
Hello all,


I got sqlcipher compiled for Windows according the messages at this topic.
The only problem I have is the sqlite3.dll dependence on llibgcc_s_dw2-1.dll. Is it possible to make a static link to libgcc_s_dw2-1 library so the sqlite3.dll has not dependence on libgcc dll?

My configure parameters are these: ./configure --disable-tcl --with-crypto-lib=none --disable-amalgamation CFLAGS="-DSQLITE_HAS_CODEC -DSQLCIPHER_CRYPTO_OPENSSL -I/c/openssl/include/ -L/c/openssl/lib"  LDFLAGS="-static -leay32 -L/c/openssl/lib /c/openssl/lib/libeay32.lib"


I already tryed several variations (with -static-libgcc, without  --disable-amalgamation ) but I had no success at all.


Thank you in advance,
Rodrigo



Em quarta-feira, 23 de dezembro de 2009 23h48min58s UTC-2, Will Parsons escreveu:
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

Re: SQLCipher with MinGW/MSYS? Rodrigo 1/29/14 6:56 PM
I got it working.

I used the following configuration: ./configure --disable-tcl --with-crypto-lib=none CFLAGS="-DSQLITE_HAS_CODEC -DSQLCIPHER_CRYPTO_OPENSSL -I/c/openssl/include/"  LDFLAGS="-static -L/c/openssl/lib -lcrypto -lgdi32"

I also compiled static lybraries from OpenSSL (libcrypto.a).






Em quarta-feira, 29 de janeiro de 2014 18h08min44s UTC-2, Rodrigo escreveu:
Re: SQLCipher with MinGW/MSYS? Ostap Romanko 1/31/14 8:42 AM
Can somebody help me build SQLCipher on Windows with MinGW. I tried maybe all solutions in this thread in order to set configuration, but nothig help. For example when I type following string 
./configure --disable-tcl --disable-amalgamation CFLAGS="-DSQLITE_HAS_CODEC -I/c/OpenSSL/include /c/OpenSSL/libeay32.dll -L/c/OpenSSL/lib/MinGW" LDFLAGS="-leay32" 
It says that: "Library crypto not found! Install openssl" However I have installed openssl in C:\OpenSSL folder. For some other strings error outputs after cheking whether the C compiler works... no. What's wrong in my strings?
Re: SQLCipher with MinGW/MSYS? César Rocha 2/7/14 12:51 PM
Hi Ostap,

I used the same configuration you are using and I got the same problem. In my case the problem was the sqlcipher version I was using. Which version are you using?

I changed to 2.0 stable and everything worked fine.

Am Freitag, 31. Januar 2014 17:42:41 UTC+1 schrieb Ostap Romanko:
Can somebody help me build SQLCipher on Windows with MinGW. I tried maybe all solutions in this thread in order to set configuration, but nothig help. For example when I type following string 
./configure --disable-tcl --disable-amalgamation CFLAGS="-DSQLITE_HAS_CODEC -I/c/OpenSSL/include /c/OpenSSL/libeay32.dll -L/c/OpenSSL/lib/MinGW" LDFLAGS="-leay32" 
It says that: "Library crypto not found! Install openssl" However I have installed openssl in C:\OpenSSL folder. For some other strings error outputs after cheking whether the C compiler works... no. What's wrong in my strings?
Re: SQLCipher with MinGW/MSYS? Stephen Lombardo 2/7/14 1:15 PM
Hello Ostap, Cesar,

This looks like it's an issue with detecting the OpenSSL libraries. Try adding --with-crypto-lib=none to the configure options, and explicitly adding -DSQLCIPHER_CRYPTO_OPENSSL to the CFLAGS. For instance, using Ostap's original example, something like this:

./configure --disable-tcl --disable-amalgamation --with-crypto-lib=none CFLAGS="-DSQLITE_HAS_CODEC -DSQLCIPHER_CRYPTO_OPENSSL -I/c/OpenSSL/include /c/OpenSSL/libeay32.dll -L/c/OpenSSL/lib/MinGW" LDFLAGS="-leay32"

This should eliminate the check for the crypto library at configure time, but still attempt to build SQLCipher using the OpenSSL provider that was introduced in SQLCipher 3.

Cheers,
Stephen


--
 
---
You received this message because you are subscribed to the Google Groups "SQLCipher Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sqlcipher+...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Re: SQLCipher with MinGW/MSYS? César Rocha 2/7/14 1:40 PM
Hi Stephen,

Thanks for your reply. I had tons of problems but I passed this part and I still have some problems here. I'm following this article: http://www.qtcentre.org/wiki/index.php?title=Building_QSQLITE_driver_with_AES-256_encryption_support_%28Windows/MinGW%29

I could finish the configuration, "make", "make dll" and "make install", but then int the part "Building the driver" the article says to open the "Qt command prompt" (I'm sorry, I'm new on this, I don't know where this QT command prompt is) to run the "qmake" and the "mingw32-make". I opened the microsoft visual c++ tools and the command prompt, the qmake worked fine, but the "mingw32-make" returned an error that was not found or the command was wrong.

What should I do now to build the driver? I cannot run the mingw32-make. What is missing?

Thanks in advance.
Regards
Cesar

Am Freitag, 7. Februar 2014 22:15:09 UTC+1 schrieb Stephen Lombardo:
Re: SQLCipher with MinGW/MSYS? César Rocha 2/8/14 3:39 AM
Hi,

I could go some steps further, but I got stuck again. I'm sending attached a print screen of my problem.

Do you know what I should do now?

Thanks in advance for any help.

Regards

Am Freitag, 7. Februar 2014 22:40:26 UTC+1 schrieb César Rocha:
Re: SQLCipher with MinGW/MSYS? Stephen Lombardo 2/10/14 2:57 PM
Hello César,

It looks like make error 255 may be a result of make not finding a command for a particular rule. Have you opened up the Makefile to determine what it is trying to execute at the point of failure?

Cheers,
Stephen
Re: SQLCipher with MinGW/MSYS? César Rocha 2/11/14 12:01 PM
Hi Stephen,

It was a sintax problem in the Makefile.Debug, there was a string where it shouldn't be I guess.
I removed and I could go some steps further, but still not working.

The process begins, it shows some files name and then appears a message "The system could not find the file, but I don't know which one or why.
I attached my screen again. Could you please take a look and see if you can figure out?

Thanks again.
Regards,
Cesar Rocha

Am Montag, 10. Februar 2014 23:57:52 UTC+1 schrieb Stephen Lombardo:
Re: SQLCipher with MinGW/MSYS? Stephen Lombardo 2/12/14 10:38 AM
Hello Cesar,

I'm not intimately familiar with the QT make files, but looking at the output, and error message, I'd strongly suspect a bad newline in the file. From your earlier message, you mentioned there was a string where it shouldn't be, so It sounds like you are making edits to the file. Line 4 of your screenshot sjhows a lib command, line 5 starts with an object file, which make is trying to execute. Try tracking that down in the Makefile and ensure that the objects are on the same line as the lib command.

Cheers,
Stephen
More topics »