-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Postgres example errors out during compile on Windows #3254
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
Comments
I encountered the same error on Windows 10 with Postgres freshly installed and its installation directory E:\PostgreSQL\bin and E:\PostgreSQL\include (which contains libpq-fe.h !) in the PATH variable. Copy libpq-fe.h from E:\PostgreSQL\include to C:\Users\CVO\AppData\Local\Temp\v It is clearly a PostgreSQL on Windows problem, doesn't happen on Linux. |
So try installing libpq-dev or its equivalent for your OS: For Ubuntu/Debian systems: |
@walkingdevel Do you have a possibility to test this and eventually close this? |
@ArtemkaKun, for now, I would keep it open. I will have a Windows device within a month, and then I will be able to check everything. |
This also happens in macos with macports. I ran the required
|
OK. So apparently, because https://github.com/vlang/v/blob/master/vlib/db/pg/pg.v will look at
It's possible that because I'm using
the build error disappeared. |
i get similar error when trying to run the example in orm doc
I am on win11 and dont have postgres locally (i am using a remote instance) |
Even if your postgres server is remote, you still need to have the headers local for your build. |
i managed to do that on wsl but not on windows. |
If you have the files in wsl, you should be able to copy them to Windows. The #flag windows -I @VEXEROOT/thirdparty/pg/include
#flag windows -L @VEXEROOT/thirdparty/pg/win64 So the .h files would go to your We definitely need better docs on this... |
Windows 10
Trying to compile the Postgres example from Github:
The text was updated successfully, but these errors were encountered: