embedding a library in Windows
biozic via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Mon Jan 30 08:40:47 PST 2017
On Monday, 30 January 2017 at 13:00:15 UTC, Nestor wrote:
> Hi,
>
> In Windows, is it possible embed a dll library into an
> application (in this particular case, sqlite3.dll)? Notice I
> don't mean storing the resource in the application to extract
> it at runtime, but rather to produce a static self-contained
> application.
>
> If it's possible, please provide a brief howto.
>
> Thanks in advance.
As an alternative, you could build an object file from Sqlite's
source code (e.g. the amalgamation file from Sqlite's website)
with a C compiler. Then you just build your D application with:
dmd app.d sqlite3.d sqlite3.o[bj]
No dll. Sqlite statically linked.
You could also try https://code.dlang.org/packages/d2sqlite3 with
option "--all-included". This wasn't tested much though.
More information about the Digitalmars-d-learn
mailing list