Re: Postgres 32 bits client compilation fail. Win32 bits client is supported? - Mailing list pgsql-hackers

From Craig Ringer
Subject Re: Postgres 32 bits client compilation fail. Win32 bits client is supported?
Date
Msg-id CAMsr+YF9ve=TXOEwAJ6G9Z0AVMFGquEU1uKV8XNAJqCHYN8qHw@mail.gmail.com
Whole thread Raw
In response to Re: Postgres 32 bits client compilation fail. Win32 bits client is supported?  (Ranier Vilela <ranier.vf@gmail.com>)
Responses Re: Postgres 32 bits client compilation fail. Win32 bits client is supported?
List pgsql-hackers
On Mon, 10 Feb 2020 at 20:14, Ranier Vilela <ranier.vf@gmail.com> wrote:
>
> "adminpack.obj : error LNK2019: sφmbolo externo indefinido _Int64GetDatum referenciado na funτπo _pg_file_write
[C:\dll\postgres\adminpack.vcxproj]
> .\Release\adminpack\adminpack.dll : fatal error LNK1120: 1 externo nπo resolvidos [C:\dll\postgres\adminpack.vcxproj]
> Done Building Project "C:\dll\postgres\adminpack.vcxproj" (default targets) -- FAILED."

You are almost certainly trying to build with a mismatched
configuration vs toolchain. See "postgres.h" for the definition of
Int64GetDatum. It's a macro if you're on a 64-bit arch where we can
pass 64-bit fields by-value efficiently; otherwise it's a function.
You're probably trying to link 32-bit extensions against a 64-bit
postgres.

Clean everything. Completely. Set up a totally clean MSVC environment
and ensure you have ONLY the 32-bit toolchain on the PATH, only 32-bit
libraries, etc. Then retry.

Rather than building via MSVC's user interface, use msbuild.exe with
the project files PostgreSQL generates for you.

See if that helps.

I've seen many mangled setups when there are mixes of different MSVC
toolchains versions on a machine. I now maintain isolated VMs with
exactly one MSVC version on each to address the amazing level of
breakage and incompatibility that MS's various toolchains seem to
deliver.

--
 Craig Ringer                   http://www.2ndQuadrant.com/
 2ndQuadrant - PostgreSQL Solutions for the Enterprise



pgsql-hackers by date:

Previous
From: Jeevan Chalke
Date:
Subject: Re: WIP/PoC for parallel backup
Next
From: Arseny Sher
Date:
Subject: Re: logical copy_replication_slot issues