diff --git a/dub.json b/dub.json index b921b56..ebb23e1 100644 --- a/dub.json +++ b/dub.json @@ -474,7 +474,8 @@ "description": "Postgresql client library. Wraps the libpq C library with my database.d interface.", "targetType": "library", "dependencies": {"arsd-official:database_base":"*"}, - "libs": ["pq"], + "libs-posix": ["pq"], + "libs-windows": ["libpq"], "sourceFiles": ["postgres.d"], "importPaths": ["."], "dflags-dmd": ["-mv=arsd.postgres=$PACKAGE_DIR/postgres.d"], diff --git a/postgres.d b/postgres.d index 1cddf14..a58b8e1 100644 --- a/postgres.d +++ b/postgres.d @@ -23,7 +23,11 @@ should be found in the PostgreSQL lib and/or bin folders (check them both!). +/ module arsd.postgres; -pragma(lib, "pq"); + +version(Windows) + pragma(lib, "libpq"); +else + pragma(lib, "pq"); public import arsd.database;