For all I know it may have been an issue with earlier versions, but I’ve just installed XE2 Pro on my HP notebook (it already had XE Starter and a few VS Expresses) and stumbled across a small issue. When attempting to compile, the following error message came up:
[Error Error] Invalid PLATFORM variable “MCD”. PLATFORM must be one of the following: “Win32”, “Win64”, or “OSX32”. If PLATFORM is defined by your system’s environment, it must be overridden in the RAD Studio IDE or passed explicitly on the command line to MSBuild; e.g., /p:Platform=Win32.
Didn’t matter what I did in the IDE itself, the error wouldn’t go away. Turns out HP in their wisdom set up many of their notebooks and desktops to have a system environment variable called Platform with values such as MCD, and MSBuild thinks this is the platform you’re trying to compile for. The fix was simple though – I just had to delete the variable. From the Start menu, start typing environment variable, then select Edit the system environment variables. Click the Environment Variables button at the bottom of the resulting dialog, find Platform under System variables, and press Delete. OK the dialog, restart the Delphi IDE, and everything should be fine.