I want to install postgreSQL-libpq on Windows 7 64 bits with ghc version 7.10.1 and cabal version 1.22.4.0
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 files\postgreSQl\9.3\bin"
I get:
Resolving dependencies...
Configuring postgresql-libpq-0.9.1.1...
Failed to install postgresql-libpq-0.9.1.1
Build log ( C:\Users\kees\AppData\Roaming\cabal\logs\postgresql-libpq-0.9.1.1.log ):
[1 of 1] Compiling Main ( D:\Temp\cabal-tmp-6140\postgresql-libpq-0.9.1.1\dist\setup\setup.hs, D:\Temp\cabal-tmp-6140\postgresql-libpq-0.9.1.1\dist\setup\Main.o )
Linking D:\Temp\cabal-tmp-6140\postgresql-libpq-0.9.1.1\dist\setup\setup.exe ...
Configuring postgresql-libpq-0.9.1.1...
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?
Kees