mirror of
https://github.com/vlang/v.git
synced 2025-08-04 02:07:28 -04: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
@ -69,6 +69,11 @@ format *PG_VERSION_NUM 17* without 0 also should work
|
|||||||
|
|
||||||
7. Add libpq.dll to v/thirdparty/pg/win64
|
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,
|
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.
|
and get this dll from its bin/ folder, or compile DB from source code.
|
||||||
```
|
```
|
||||||
|
@ -6,7 +6,11 @@ import orm
|
|||||||
$if $pkgconfig('libpq') {
|
$if $pkgconfig('libpq') {
|
||||||
#pkgconfig --cflags --libs libpq
|
#pkgconfig --cflags --libs libpq
|
||||||
} $else {
|
} $else {
|
||||||
#flag -lpq
|
$if msvc {
|
||||||
|
#flag -llibpq
|
||||||
|
} $else {
|
||||||
|
#flag -lpq
|
||||||
|
}
|
||||||
#flag linux -I/usr/include/postgresql
|
#flag linux -I/usr/include/postgresql
|
||||||
|
|
||||||
#flag darwin -I/opt/local/include/postgresql11
|
#flag darwin -I/opt/local/include/postgresql11
|
||||||
|
Loading…
x
Reference in New Issue
Block a user