Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1guDjJ-0001oB-Bm for pgsql-general@arkaria.postgresql.org; Thu, 14 Feb 2019 09:54:53 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1guDjI-0007z6-2j for pgsql-general@arkaria.postgresql.org; Thu, 14 Feb 2019 09:54:52 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gu2uA-0007Vl-P3 for pgsql-general@lists.postgresql.org; Wed, 13 Feb 2019 22:21:22 +0000 Received: from mx2.dnit.gov.br ([189.9.19.4]) by makus.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1gu2u5-0003NX-J8 for pgsql-general@postgresql.org; Wed, 13 Feb 2019 22:21:19 +0000 X-AuditID: 0a640f2a-783ff70000000ad8-7e-5c649849bf5a Received: from SEDEDF005BSA.intra.dnit (sededf005bsa.intra.dnit [10.100.10.36]) by mx2.dnit.gov.br (Welcome to MailQ) with SMTP id 1A.E8.02776.948946C5; Wed, 13 Feb 2019 20:20:57 -0200 (-02) Received: from SEDEDF007BSA.intra.dnit (10.100.10.56) by SEDEDF005BSA.intra.dnit (10.100.10.36) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Wed, 13 Feb 2019 20:21:12 -0200 Received: from SEDEDF007BSA.intra.dnit ([fe80::5c00:4c79:87bb:c2c0]) by SEDEDF007BSA.intra.dnit ([fe80::5c00:4c79:87bb:c2c0%14]) with mapi id 15.00.1395.000; Wed, 13 Feb 2019 20:21:11 -0200 From: Roberto de Figueiredo Ribeiro To: "pgsql-general@postgresql.org" Subject: Problem linking to libpq.lib on Windows Thread-Topic: Problem linking to libpq.lib on Windows Thread-Index: AdTD5w3mUqTDOn+JQIWQgmBiiv3ZAg== Date: Wed, 13 Feb 2019 22:21:11 +0000 Message-ID: <3e0380f71d28430ba5172bf985172447@SEDEDF007BSA.intra.dnit> Accept-Language: pt-BR, en-US Content-Language: pt-BR X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-exchange-transport-fromentityheader: Hosted x-originating-ip: [10.100.110.57] Content-Type: multipart/alternative; boundary="_000_3e0380f71d28430ba5172bf985172447SEDEDF007BSAintradnit_" MIME-Version: 1.0 X-Brightmail-Tracker: H4sIAAAAAAAAA02Sf2wTZRjHfXu37lp32+26bo+dY9CoyNBZGlQSyWQhMSX8YxzGoB16o7e2 ob3NtsPOGJjNVCQdYcBKV+kcK9NtafihGxJgZXQDNuKCEpYKg07ETTr5ES0ByXTxrteu/efN 9/087/N9n/e+R2C0X6YizJyDtXGMRS2V43KD/JkX13kNek3L7NJV+28MSNcg3U8hT/ab6F35 agNrMW9lbS9VfCA3fdr+l6Q+onb+Ft+HN6HORTuRjABqJRzfcViyE8kJmhpCEN89jIubfgSt M/9h4uYsgua2ICa0SKm1cOHhHqmgC6hKCEw9SHAFpYFfY0cwkb8M/vmR5JlyaJ7uSmicehY+ C/ZkCZqk3oBI7yQSNKJKwP/vYLagMaoIAv29EnE8Cg6dvoSJWgmxW/NZotbAQHcIF/USiIVj mNhrBV+oDRf982Gs/Xd8N1L4Mmx9Gcd8GcdE/gJ0nvpbKurl8M3BP7GU/nHoliSTd6LsPlRo txrtmxmOY23acj4VG1Nu4MyO71AimLyyE6h9eHMYUQRS55BO2qCns5it9kZrGK0nJGol+d4y HuXW1BkaTYzd9L6twcLa1QWk0sNjcgHXNFi2qFVkrUAVC5RjP7JbWAf/J4QREBjfVrpXaDMw jR+ztjrRLIyKCVxdRFZ7dHqaMjIOdgvL1rO2VHUDQaiB/GU/35hvY42ss9ZscaTKfF/pJ3yF yqwkhikhxyU1erows5A5j4SQhZGOyOGHWit4k/Z6xmo3G5O+CvKQ8JacFE14PkXeEyCdgmm/ i8hKDHXd9GPE2CNh7Z+a4deTwkrjXB3HqorIgHANJfSaGriFF6gKSS/HF/IyCsJlqqfJ5wKM nlZm8PR9s+gu4hNTkE8Ipjl8runRaXKTMOWTSZiYHMj1iQ+YZGkjbTfvQ3XjcOWPY9lwO3pJ BqfcrXngHj+eDyc8P6vANTFQDMHTLaUQ65tYDPsOdyyB+NiBcvDeHdfA6OiNFdDhPbcSbs/5 X4FY0+AqCJ0/8BrER12V8PjRDh14R6M6uNpx/y0YGwlWwcDlr96BEddkNRybaTKAq63ZwFv1 1ELX9GUj7I1ErfCPe74O+r+OfAg957scEG+555zls5LwWU0XJLJyMI7MrGxUIqskTWZ1JjeR VRKmn6xqQnvIxUenf3BP5nrORR5c/37b6m/z738RKS7KK1HORZ8PVdZ+GXzbGK84YlTuqgq6 t9+5c03buvzhFWaZ4ezrJzlN23azUz1kdTKDWHRbR29F4ZxPO3z9zKZXj/a5pj7faFx08fFV XUl7vLR/1xpZ4EK1VD/RPL7xprbMeW1pVVYAAzVuNzEryjCbnfkfcsGgPDAFAAA= List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk --_000_3e0380f71d28430ba5172bf985172447SEDEDF007BSAintradnit_ Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Hi list, I'm building a platform on C++ that uses parts of the libpq-fe.h in it. I h= ad been previously compiling it in linux, and all was fine. Switched to win= dows, 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 somethin= g that should be created on-the-fly, and perhaps the compiler is pointing s= omewhere else? --_000_3e0380f71d28430ba5172bf985172447SEDEDF007BSAintradnit_ Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable

Hi list,

 

I’m building a platform o= n C++ that uses parts of the libpq-fe.h in it. I had been previousl= y 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 comp= iling with:

 

>: cl /I path\to\include mai= n.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’<= /span>

 

Is this “lib.obj” f= ile actually required by the linker? Or is this something that should be cr= eated on-the-fly, and perhaps the compiler is pointing somewhere else?=

--_000_3e0380f71d28430ba5172bf985172447SEDEDF007BSAintradnit_--