Delphi platform error on Hewlett Packard customized OEM Windows

陌路散爱 提交于 2019-12-10 17:49:42

问题


I keep getting the same error setting up my computer so it will run Delphi, I've already set up a user override on the PLATFORM environment variable, to convert it to win32 but it's still giving the same error;

[Error Error] Invalid PLATFORM variable "HPD". PLATFORM must be one of the following: "Win32", "Win64", "Android", "iOSSimulator", "iOSDevice", 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.

Can anyone explain why it's doing this and how to fix the error? The fact that I was working in Delphi XE2 in college and I'm using Delphi XE3 now may affect this


回答1:


You're probably using an HP computer. They come pre-configured with a PLATFORM environmental variable.

The newer XPlatform versions of Delphi use the PLATFORM variable to track what the target build is for (WIN32, WIN64, ANDROID, iOSSimulator, iOSDevice,or OSX32). Since there's already one there, it's trying to use it, but can't figure out what to do with a target of HPD.

The easiest way to fix this for all your projects is to go into your computer's settings (right-click My Computer on the desktop or Start Menu, Properties->Advanced System Settings->Environmental Variables, and just delete the PLATFORM variable. (HP doesn't seem to use it for anything, and I've done this on half a dozen computers with no ill effects.)




回答2:


This is a known problem (see for example Chris Rolliston's blog) with HP computers - they do set up a system environment variable called PLATFORM which conflicts with the parameter expected by MSBuild. Solution is to delete the environment variable.



来源:https://stackoverflow.com/questions/15787472/delphi-platform-error-on-hewlett-packard-customized-oem-windows

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!