Boost logo

Boost Users :

Subject: Re: [Boost-users] Is Boost API 32Bit only?
From: Gavin Lambert (gavinl_at_[hidden])
Date: 2017-03-16 23:51:39


On 17/03/2017 09:01, Andrej Georgi via Boost-users wrote:
> I try to build Boost on MSYS2-64Bit which includes 64-Bit headers of
> windows. Boost is calling a 32-Bit variant of windows API even when
> Boost is configured to build 64-Bit.
>
> There is a 64Bit pre build variant of Boost on sourceforge. That seems
> to run only in visual studio? Does it use a 32 Bit API as well?

This seems like either a misunderstanding or misreporting.

The Windows headers are not "32-bit" or "64-bit". They are both.

A 32-bit process will call 32-bit APIs. A 64-bit process will call
64-bit APIs. It is completely impossible to do anything else.

The APIs have the same names and are implemented in libraries with the
same names (and apparently in the same path, although actually in a
different path, due to Windows trickery).

The only differences are that the parameter sizes for *some* of the APIs
are different, as they use 64-bit integers and pointers in some places
instead of 32-bit ones.

Pointer parameters will Just Work™. Integer parameters need to be
explicitly specified as either one size, the other size, or both sizes
(which one is actually used then depending on the target address model).
  If they're specified incorrectly then code is likely to crash or
otherwise misbehave. If you think that Boost has somehow mis-specified
one or more of these, you should be explicit about it, including both
your Boost version and which ones you think are incorrect or what errors
you're getting.

Most likely, though, you're just compiling something incorrectly and/or
trying to link 32-bit and 64-bit code together.


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net