Thread overview
Linking etc.c.sqlite3 on Win32
May 25, 2013
Nick Sabalausky
May 25, 2013
Andrej Mitrovic
May 25, 2013
Nick Sabalausky
May 25, 2013
Ok, uhhh...How do I do it?

I did already grab <http://www.sqlite.org/2013/sqlite-dll-win32-x86-3071700.zip> which contains "sqlite3.dll" and "sqlite3.def", FWIW.

May 25, 2013
On 5/25/13, Nick Sabalausky <SeeWebsiteToContactMe@semitwist.com> wrote:
> Ok, uhhh...How do I do it?

Never used sqlite, but for implicit linking you need an import library which you then just pass to DMD at command-line. Use implib[1], probably with the /system switch on the DLL (or on the .def file).

E.g. one of these probably:

implib sqlite3_implib.lib sqlite3.def /system
implib sqlite3_implib.lib sqlite3.dll /system

And then: $ dmd sqlite3_implib.lib mymain.d

For explicit linking.. well that's the LoadLibrary/GetProcAddress approach, no import library needed there, but more work is needed.

[1] : http://ftp.digitalmars.com/bup.zip from http://www.digitalmars.com/download/freecompiler.html
May 25, 2013
On Sun, 26 May 2013 00:03:01 +0200
Andrej Mitrovic <andrej.mitrovich@gmail.com> wrote:

> On 5/25/13, Nick Sabalausky <SeeWebsiteToContactMe@semitwist.com> wrote:
> > Ok, uhhh...How do I do it?
> 
> Never used sqlite, but for implicit linking you need an import library which you then just pass to DMD at command-line. Use implib[1], probably with the /system switch on the DLL (or on the .def file).
> 
> E.g. one of these probably:
> 
> implib sqlite3_implib.lib sqlite3.def /system
> implib sqlite3_implib.lib sqlite3.dll /system
> 
> And then: $ dmd sqlite3_implib.lib mymain.d
> 
> For explicit linking.. well that's the LoadLibrary/GetProcAddress approach, no import library needed there, but more work is needed.
> 
> [1] : http://ftp.digitalmars.com/bup.zip from http://www.digitalmars.com/download/freecompiler.html


Ahh thanks. I hadn't been able to find implib before, so that helped and then this worked:

implib /system sqlite3.lib sqlite3.dll
rdmd [...etc...] sqlite3.lib [...etc...]