[Haskell-cafe] problem installing postgreSQL-libpq on Windows

Kees Bleijenberg K.Bleijenberg at lijbrandt.nl
Thu Jun 16 07:19:27 UTC 2016


I want to install postgreSQL-libpq on Windows 7 64 bits with ghc version
7.10.1 and cabal version

This is what I did: 

Installed mingw

>From the msys prompt: pexports "d:\program
files\postgreSQL\9.3\bin\libpq.dll" > libpq.def

>From the msys prompt: dlltool  -d libpq.def -l libpq.a

The file libpq.a is created. I copied the file to d:\program
files\postgreSQL\9.3\bin\ and then from de cmd prompt:

cabal install postgreSQL-libpq --extra-include-dirs="d:\program
files\postgreSQL\9.3\include" --extra-lib-dirs="d:\program

I get: 

Resolving dependencies...

Configuring postgresql-libpq-

Failed to install postgresql-libpq-

Build log (
C:\Users\kees\AppData\Roaming\cabal\logs\postgresql-libpq- ):

[1 of 1] Compiling Main             (
D:\Temp\cabal-tmp-6140\postgresql-libpq-\dist\setup\Main.o )

Linking D:\Temp\cabal-tmp-6140\postgresql-libpq-\dist\setup\setup.exe

Configuring postgresql-libpq-

setup.exe: Missing dependency on a foreign library:

* Missing C library: pq

This problem can usually be solved by installing the system package that

provides this library (you may need the "-dev" version). If the library is

already installed but in a non-standard location then you can use the flags

--extra-include-dirs= and --extra-lib-dirs= to specify where it is.


What can I do?



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/haskell-cafe/attachments/20160616/92992127/attachment.html>

More information about the Haskell-Cafe mailing list