embedding a library in Windows

Nestor via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Mon Jan 30 09:25:13 PST 2017


On Monday, 30 January 2017 at 16:40:47 UTC, biozic wrote:
> 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.

I tried to compile a static library with MinGW (which is the one 
I have at hand, v4.8.1) with this command:

gcc -static -c sqlite3.c

However:

D:\prj\sqltest2\source>dmd app.d database.d sqlite.d sqlite3.o
Error: unrecognized file extension o


More information about the Digitalmars-d-learn mailing list