www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.learn - SQLite library on Windows

reply "BLM768" <blm768 gmail.com> writes:
I've been trying various methods to get SQLite working in Windows 
using the etc.c.sqlite3 bindings, but I can't figure out how to 
get everything in a form that DMD likes. GCC doesn't seem to 
output anything that OPTLINK can use, and I can't use the 
standard DLL build without creating a .LIB file from it, which 
apparently isn't an easy task. I can't remember if I've tried 
compiling SQLite with DMC, but I'd rather avoid that option 
because it would require a custom Makefile. Maybe objcopy has an 
option that would help...

Has anyone managed to get the library working on Windows?
Dec 26 2012
next sibling parent "evilrat" <evilrat666 gmail.com> writes:
On Thursday, 27 December 2012 at 01:45:26 UTC, BLM768 wrote:
 I've been trying various methods to get SQLite working in 
 Windows using the etc.c.sqlite3 bindings, but I can't figure 
 out how to get everything in a form that DMD likes. GCC doesn't 
 seem to output anything that OPTLINK can use, and I can't use 
 the standard DLL build without creating a .LIB file from it, 
 which apparently isn't an easy task. I can't remember if I've 
 tried compiling SQLite with DMC, but I'd rather avoid that 
 option because it would require a custom Makefile. Maybe 
 objcopy has an option that would help...

 Has anyone managed to get the library working on Windows?
have you tried feed import lib to coffimplib tool to make omf format lib for optlink? ftp://ftp.digitalmars.com/coffimplib.zip
Dec 26 2012
prev sibling next sibling parent reply "jose isaias cabrera" <cabrera wrc.xerox.com> writes:
"BLM768" ...
 Has anyone managed to get the library working on Windows?
I have a huge project with D1 using the old DDBI project in dsource: http://dsource.org/projects/ddbi It would be nice if someone with time will port it to D2. IHTH. jic
Dec 26 2012
parent "BLM768" <blm768 gmail.com> writes:
On Thursday, 27 December 2012 at 03:03:34 UTC, jose isaias 
cabrera wrote:
 I have a huge project with D1 using the old DDBI project in 
 dsource:

 http://dsource.org/projects/ddbi

 It would be nice if someone with time will port it to D2.  IHTH.

 jic
Actually, my current project is basically along those lines. It currently only has a partial interface and an SQLite driver for now, though, and the interface will probably be quite different from DDBI's (largely for performance reasons).
Dec 26 2012
prev sibling parent reply "Robik" <szadows gmail.com> writes:
On Thursday, 27 December 2012 at 01:45:26 UTC, BLM768 wrote:
 I've been trying various methods to get SQLite working in 
 Windows using the etc.c.sqlite3 bindings, but I can't figure 
 out how to get everything in a form that DMD likes. GCC doesn't 
 seem to output anything that OPTLINK can use, and I can't use 
 the standard DLL build without creating a .LIB file from it, 
 which apparently isn't an easy task. I can't remember if I've 
 tried compiling SQLite with DMC, but I'd rather avoid that 
 option because it would require a custom Makefile. Maybe 
 objcopy has an option that would help...

 Has anyone managed to get the library working on Windows?
Download their windows binaries and use Digital Mars implib tool with /system switch.
Dec 27 2012
parent reply "BLM768" <blm768 gmail.com> writes:
 Download their windows binaries and use Digital Mars implib 
 tool with /system switch.
Man, I wish I'd known about that tool a while ago... It seems to be working, but it looks like I'll need to recompile the DLL myself; DMD is looking for symbols mangled with a leading underscore, but the DLL has unmangled symbols, so optlink still complains.
Dec 27 2012
parent "BLM768" <blm768 gmail.com> writes:
 Man, I wish I'd known about that tool a while ago...

 It seems to be working, but it looks like I'll need to 
 recompile the DLL myself; DMD is looking for symbols mangled 
 with a leading underscore, but the DLL has unmangled symbols, 
 so optlink still complains.
Oh; never mind. I forgot the /system switch. Now I feel like an idiot. :)
Dec 27 2012