There isn't a pg.lib file in my PG17 installation on Win11 Pro - the closest I see is postgres.lib. What did I miss?


----------------------------- D source code ------------------------------------

import dpq2;
import std.stdio;

    void main() {
        // Adjust credentials as needed
string connStr = "host=localhost port=5432 dbname=postgres user=postgres password=iwed";

        try {
            auto conn = new Connection(connStr);
auto result = conn.exec("SELECT version(), current_date");

            writeln("Connected to PostgreSQL!");
writeln("PostgreSQL version: ", result[0][0].as!PGtext);
            writeln("Current date: ", result[0][1].as!PGtext);
        } catch (Exception e) {
            writeln("Connection failed: ", e.msg);
        }
    }


----------------- DUB.JSON ---------------------------------

    {
      "description": "A minimal D application.",
      "license": "MIT",
      "name": "pg_app",
      "authors": [
        "me"
      ],
      "copyright": "Copyright © 2025, me",
      "dependencies": {
        "dpq2": "~>1.2.3"
      },
    }

------------------- build output ---------------------------------------------

    D:\projects\D\GUI_App>dub build
Starting Performing "debug" build using D:\D\dmd2\windows\bin64\dmd.exe for x86_64. Up-to-date derelict-pq 4.0.0: target for configuration [derelict-pq-static] is up to date. Up-to-date money 3.0.2: target for configuration [library] is up to date. Up-to-date stdx-allocator 2.77.5: target for configuration [library] is up to date. Up-to-date vibe-container 1.6.2: target for configuration [library] is up to date. Up-to-date vibe-serialization 1.0.7: target for configuration [library] is up to date. Building pg_app ~master: building configuration [application]
         Linking pg_app
    LINK : fatal error LNK1104: cannot open file 'pq.lib'
    Error: linker exited with status 1104
  • Didn't take this... kp via Digitalmars-d-learn

Reply via email to