<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><meta http-equiv=Content-Type content="text/html; charset=us-ascii"><meta name=Generator content="Microsoft Word 14 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0cm;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:"Calibri","sans-serif";
mso-fareast-language:EN-US;}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:purple;
text-decoration:underline;}
span.E-mailStijl17
{mso-style-type:personal-compose;
font-family:"Calibri","sans-serif";
color:windowtext;}
.MsoChpDefault
{mso-style-type:export-only;
font-family:"Calibri","sans-serif";
mso-fareast-language:EN-US;}
@page WordSection1
{size:612.0pt 792.0pt;
margin:70.85pt 70.85pt 70.85pt 70.85pt;}
div.WordSection1
{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]--></head><body lang=NL link=blue vlink=purple><div class=WordSection1><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal><span lang=EN-US>I want to install postgreSQL-libpq on Windows 7 64 bits with ghc version 7.10.1 and cabal version 1.22.4.0<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>This is what I did: <o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>Installed mingw<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>From the msys prompt: pexports "d:\program files\postgreSQL\9.3\bin\libpq.dll" > libpq.def<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>From the msys prompt: dlltool -d libpq.def -l libpq.a<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>The file libpq.a is created. I copied the file to d:\program files\postgreSQL\9.3\bin\ and then from de cmd prompt:<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>cabal install postgreSQL-libpq --extra-include-dirs="d:\program files\postgreSQL\9.3\include" --extra-lib-dirs="d:\program files\postgreSQl\9.3\bin"<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>I get: <o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>Resolving dependencies...<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>Configuring postgresql-libpq-0.9.1.1...<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>Failed to install postgresql-libpq-0.9.1.1<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>Build log ( C:\Users\kees\AppData\Roaming\cabal\logs\postgresql-libpq-0.9.1.1.log ):<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>[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 )<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>Linking D:\Temp\cabal-tmp-6140\postgresql-libpq-0.9.1.1\dist\setup\setup.exe ...<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>Configuring postgresql-libpq-0.9.1.1...<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>setup.exe: Missing dependency on a foreign library:<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>* Missing C library: pq<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>This problem can usually be solved by installing the system package that<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>provides this library (you may need the "-dev" version). If the library is<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>already installed but in a non-standard location then you can use the flags<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>--extra-include-dirs= and --extra-lib-dirs= to specify where it is.<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p><p class=MsoNormal>What can I do?<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>Kees<o:p></o:p></p></div></body></html>