[Vm-dev] WIN32, _WIN32 and option: pragma
akgrant0710 at gmail.com
Tue Feb 6 02:33:31 UTC 2018
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.
What's the correct solution?
More information about the Vm-dev