mirror of
https://github.com/vlang/v.git
synced 2025-09-13 06:22:26 +03:00
db.pg: fix compilation error with the msvc compiler on windows, and add readme (#20326)
This commit is contained in:
parent
f53031feda
commit
363d4e1f5a
2 changed files with 10 additions and 1 deletions
|
@ -69,6 +69,11 @@ format *PG_VERSION_NUM 17* without 0 also should work
|
|||
|
||||
7. Add libpq.dll to v/thirdparty/pg/win64
|
||||
|
||||
If you are going to use the msvc compiler:
|
||||
7. Add libpq.lib(C:\Program Files\PostgreSQL\{version}\lib) to v/thirdparty/pg/win64/msvc
|
||||
|
||||
8. Add libpq.dll, libcrypto-3-x64.dll, libssl-3-x64.dll to where your executable is.
|
||||
|
||||
To get the libpq.dll file, you can install the PostgreSQL database,
|
||||
and get this dll from its bin/ folder, or compile DB from source code.
|
||||
```
|
||||
|
|
|
@ -6,7 +6,11 @@ import orm
|
|||
$if $pkgconfig('libpq') {
|
||||
#pkgconfig --cflags --libs libpq
|
||||
} $else {
|
||||
#flag -lpq
|
||||
$if msvc {
|
||||
#flag -llibpq
|
||||
} $else {
|
||||
#flag -lpq
|
||||
}
|
||||
#flag linux -I/usr/include/postgresql
|
||||
|
||||
#flag darwin -I/opt/local/include/postgresql11
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue