Problem linking to libpq.lib on Windows

From: Roberto de Figueiredo Ribeiro <roberto(dot)f(dot)ribeiro(at)dnit(dot)gov(dot)br>
To: "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
Subject: Problem linking to libpq.lib on Windows
Date: 2019-02-13 22:21:11
Message-ID: 3e0380f71d28430ba5172bf985172447@SEDEDF007BSA.intra.dnit
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi list,

I'm building a platform on C++ that uses parts of the libpq-fe.h in it. I had been previously compiling it in linux, and all was fine. Switched to windows, now during linking it accuses an error, unable to find an object file.

This is the line I'm compiling with:

>: cl /I path\to\include main.cpp /link /libpath path\to\lib -opt:ref libpq.lib

And the error I get is:

>: LINK: fatal error LNK1181: cannot open input file 'path\to\postgres\lib.obj'

Is this "lib.obj" file actually required by the linker? Or is this something that should be created on-the-fly, and perhaps the compiler is pointing somewhere else?

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Rich Shepard 2019-02-13 22:24:36 Re: Subquery to select max(date) value
Previous Message Michael Lewis 2019-02-13 21:54:06 Re: Postgrest over foreign data wrapper