Search code examples
delphidelphi-10.2-tokyo

Delphi 10.2 Tokyo no longer supports IMAGE_FILE_LARGE_ADDRESS_AWARE?


According to the DocWiki which was simply probably not updated, the following should be a valid directive in a .pas file:

{$SetPEFlags IMAGE_FILE_LARGE_ADDRESS_AWARE}

However it causes this dcc32 error:

[dcc32 Error] Project1.dpr(13): E2003 Undeclared identifier: 'IMAGE_FILE_LARGE_ADDRESS_AWARE'

Has this ability been lost, or is it now always on?


Solution

  • IMAGE_FILE_LARGE_ADDRESS_AWARE is declared in Windows.pas (WinAPI.Windows in recent Delphi versions). You've apparently not included it in the unit where you've put the directive. If you're avoiding that for some reason, define it yourself:

    IMAGE_FILE_LARGE_ADDRESS_AWARE = $0020;