How to use SQLite library in D language program on Windows?

Viewed 992

How to use SQLite3 library in D language program on Windows?

I found a similar question with Ubuntu, but it didn't work in my case.

import std.stdio, std.string, etc.c.sqlite3;

void main () {
  sqlite3* db;
  auto ret = sqlite3_open (toStringz("mydb.s3db"), &db);
  writeln (ret);
}

As I assume, the sqlite3.d is some kind of header to the real SQLite3 library. I've got an sqlite3.dll, but I have no idea about how to link it with my program. pragma works only with lib formate (like pragma(lib, "sqlite3")).

Maybe I should use the SQLite sources, but how is it possible to compile it together with D code? Or is it better to find some way to convert dll to lib?

What is a general method to solve such problems in D?

2 Answers
Related