[Vm-dev] WIN32, _WIN32 and option: pragma
akgrant0710 at gmail.com
Sun Feb 18 16:23:06 UTC 2018
On 17 February 2018 at 00:10, Eliot Miranda <eliot.miranda at gmail.com> wrote:
> Hi Alistair,
> On Mon, Feb 5, 2018 at 6:33 PM, Alistair Grant <akgrant0710 at gmail.com> wrote:
>> Hi Everyone,
>> Would someone mind clarifying how I should be using the windows
>> platform macros. My understanding is:
>> - WIN32 is defined by the VM build scripts on Windows 32 bit only
>> - WIN64 is defined by the VM build scripts on Windows 64 bit only
>> - _WIN32 is defined by the compiler on Windows 32 and 64 bit.
>> - _WIN64 is defined by the compiler on Windows 64 bit only.
>> If my understanding is incorrect, please correct me.
>> If I want code that only runs on Windows (32 or 64 bit), I should
>> check if _WIN32 is defined.
>> The FileAttributesPlugin has a method with "<option: #WIN32>", which
>> causes it to only be compiled on Windows 32 bit, while I also need it on
>> Windows 64 bit.
>> "<option: #_WIN32>" isn't recognised, so the code is never generated,
>> and I couldn't figure out how to have #WIN32 OR #WIN64.
> Sorry not to have got to this sooner, but the support is in there now. So by all means use <option: #_WIN32> now.
Thanks! I'm focusing on the in-image integration at the moment, but
I'll definitely change this back to using the option: pragma.
More information about the Vm-dev