haskellcabalyesodhaskell-platformhdbc

cannot load HDBC-postgresql


I am on windows XP. I have installed Yesod by following the steps on this page: http://www.yesodweb.com/page/five-minutes

I have created a scaffolded application with Postgresql persistence. When I ran "yesod devel" for the first time it gave me an error about some postgresql package missing (I do not remember the name), so I installed it using cabal. now when I run "yesod devel" it gives me the error below:

Loading package HDBC-postgresql-2.2.3.3 ... ghc.exe: pq: The specified module co
uld not be found.
: can't load .so/.DLL for: pq (addDLL: could not load DLL)
yesod: Network.Socket.accept: failed (No error)
I have HDBC-postgresql-2.2.3.3 installed and I have installed it with the --extra-lib-dirs set to the postgresql's bin folder wih all the DLLs but it did not help.

As far as I understand it is trying to load pq.dll, but I do not have it on my system, I have libpq.dll, so I tried to rename the dll, to no avail. I am lost.

Please help

Konstantin


Solution

  • On Windows, %path% needs to be set correctly. I have postgresql installed under "Program Files", and for some reason HDBC-postgresql does not like the fact that the path contains a space, so I ended up adding the 8.3 path version to the %path% and it seemed to have solved the problem.