Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"Missing C library: pq" on Windows 7 #22

Open
WillSewell opened this issue Aug 11, 2014 · 3 comments
Open

"Missing C library: pq" on Windows 7 #22

WillSewell opened this issue Aug 11, 2014 · 3 comments

Comments

@WillSewell
Copy link

I get this error even though I have PostgreSQL installed. I have tried cabal install --extra-lib-dirs="C:\PostgreSQL\include\libpq\" postgresql-simple which contains libpq-fs.h, but still no luck.

Here is the full error:

Configuring postgresql-libpq-0.9.0.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.
Failed to install postgresql-libpq-0.9.0.1
@lpsmith
Copy link
Owner

lpsmith commented Aug 26, 2014

Sorry for not seeing this until now; gmail has decided to start filing github notices under "promotions". >:o

I can't help too much, as I don't really use Windows and I have not compiled or used postgresql-libpq on Windows myself. However, you might find these instructions helpful: lpsmith/postgresql-simple#66

@WillSewell
Copy link
Author

Thank you. I will try that out.

@joozek78
Copy link

joozek78 commented Jul 3, 2015

I see that it's old, but I recently encountered the same problem. I had to have both libpq.dll and pg_config in my build dir.
It would be nice to hint that in error message. It's especially misguiding that exe is required when error message states that C library is missing

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants