On Monday, 30 January 2017 at 13:58:45 UTC, Adam D. Ruppe wrote:
On Monday, 30 January 2017 at 13:29:20 UTC, Nestor wrote:
OK, and in case I have a sqlite3.a file
Just pass the sqlite3.a file instead of sqlite3.lib and the
compiler should do the rest... worst case is you might need to
edit the source of my sqlite.d to comment out the pragma(lib)
line to explicitly deny the dependency, but I think it will
just work with the .a since it will find the functions in there.
d:\prj\sqltest2\source>dmd app.d database.d sqlite.d sqlite3.a
Error: unrecognized file extension a
I took the file from
http://math.seattleacademy.org/andersgibbons/fall17/node_modules/sqlite3/build/Release/ so I am not 100% sure it's compatible (I don't know how to build it myself), but in any case dmd doesn't recognize the extension.
If I delete the sqlite3.lib or remove the pragma from sqlite.d
(or both), I get this instead:
d:\prj\sqltest2\source>dmd app.d database.d sqlite.d
OPTLINK (R) for Win32 Release 8.00.17
Copyright (C) Digital Mars 1989-2013 All rights reserved.
http://www.digitalmars.com/ctg/optlink.html
app.obj(app)
Error 42: Symbol Undefined _sqlite3_open
app.obj(app)
Error 42: Symbol Undefined _sqlite3_finalize
app.obj(app)
Error 42: Symbol Undefined _sqlite3_prepare_v2
app.obj(app)
Error 42: Symbol Undefined _sqlite3_free
app.obj(app)
Error 42: Symbol Undefined _sqlite3_mprintf
app.obj(app)
Error 42: Symbol Undefined _sqlite3_exec
app.obj(app)
Error 42: Symbol Undefined _sqlite3_last_insert_rowid
app.obj(app)
Error 42: Symbol Undefined _sqlite3_changes
app.obj(app)
Error 42: Symbol Undefined _sqlite3_errmsg
app.obj(app)
Error 42: Symbol Undefined _sqlite3_close
app.obj(app)
Error 42: Symbol Undefined _sqlite3_reset
app.obj(app)
Error 42: Symbol Undefined _sqlite3_column_blob
app.obj(app)
Error 42: Symbol Undefined _sqlite3_column_bytes
app.obj(app)
Error 42: Symbol Undefined _sqlite3_column_text
app.obj(app)
Error 42: Symbol Undefined _sqlite3_step
app.obj(app)
Error 42: Symbol Undefined _sqlite3_column_double
app.obj(app)
Error 42: Symbol Undefined _sqlite3_column_count
app.obj(app)
Error 42: Symbol Undefined _sqlite3_column_type
app.obj(app)
Error 42: Symbol Undefined _sqlite3_column_int
app.obj(app)
Error 42: Symbol Undefined _sqlite3_column_name
app.obj(app)
Error 42: Symbol Undefined _sqlite3_bind_blob
app.obj(app)
Error 42: Symbol Undefined _sqlite3_bind_null
app.obj(app)
Error 42: Symbol Undefined _sqlite3_bind_double
app.obj(app)
Error 42: Symbol Undefined _sqlite3_bind_int
app.obj(app)
Error 42: Symbol Undefined _sqlite3_bind_text
Error: linker exited with status 214890840