Need example of usage DerelictPQ

Adam D. Ruppe via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Wed Dec 24 12:23:00 PST 2014


On Wednesday, 24 December 2014 at 19:26:11 UTC, Suliman wrote:
> 1. how to build it with dub?

I don't know, I don't use dub.

> 2. I tried to: dmd app.d database.d postgres.d but get message 
> that "File Not Found pq.lib"

Download the lib file from me here:

http://arsdnet.net/dcode/pq.lib


You'll still need the DLLs, the difference between my lib and the 
Derelict one is I bind it statically whereas Derelict loads the 
dll at runtime. Both need the dll, but Derelict skips the lib 
step.

It is the same API though, so you could also just use my source 
as an example to guide writing your derelict based program.

> 3. Can I build it's simply: dmd app.d ?
> Would it able to import other 2 file?

Won't work since then the other functions won't be compiled, 
always need to pass them along to dmd too or build a separate 
.lib (but that's not really worth the hassle)


More information about the Digitalmars-d-learn mailing list