Re: [sqlite] MSWindows SQLite Compilation

2007-01-10 Thread Doug Currie
On Wednesday, January 10, 2007 Leonardo Mateo wrote: 

> I'm trying to get an implib from sqlite3.dll to link with.

The easiest way to do this with MinGW/MSYS is to use the configure and
make tools with the source distribution, e.g., sqlite-3.3.10.tar.gz
The instructions on how to do this are in the first 20 lines of the
README file in that archive.

> The generated implib is suspiciously small (790 b)
> When I try to compile I got an undefined reference to sqlite3_open error

When you make an implib from a DLL, ld makes an implib that assumes
your code will use the DLL. There is hardly ever a reason to do this
since gcc will link against the DLL directly.

e

-- 
Doug Currie
Londonderry, NH, USA


-
To unsubscribe, send email to [EMAIL PROTECTED]
-



[sqlite] MSWindows SQLite Compilation

2007-01-10 Thread Leonardo Mateo

Hi guys, I'm trying to get an implib from sqlite3.dll to link with.
I'm developing a dll which will use SQLite API, but I'm trying to
avoid shipping sqlite3.dll for simplicity.
The fact is, I've downloaded sqlite-source-3_3_9.zip and
sqlitedll-3_3_9.zip from SQLite web site and, what I'm trying to do
is:
Include sqlite3.h from within my code,
Generate an implib file with ld (from MinGW)
Link with this implib.

The problems are:
The generated implib is suspiciously small (790 b)
When I try to compile I got an undefined reference to sqlite3_open error

The commands I used were:
D:\Development\plugins-test>ld -shared --export-all-symbols --out-implib libsqli
te3-1.lib C:\Windows\sqlite3.dll
Output:
Creating library file: libsqlite3-1.lib

D:\Development\plugins-test>gcc -shared -Wl,-L./,-llibsqlite3-1 dllfunc.o
Output:
dllfunc.o(.text+0x15):dllfunc.c: undefined reference to `sqlite3_open'
dllfunc.o(.text+0x24):dllfunc.c: undefined reference to `sqlite3_errmsg'
collect2: ld returned 1 exit status

The problem is with the implib file, does any one know how I have to do this?

Thanx a lot in advance

--
Leonardo Mateo.
There's no place like ~

-
To unsubscribe, send email to [EMAIL PROTECTED]
-