0
votes

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?

2
Works as before. Have you included Winapi.Windows module?Victoria
That was the problem. I didn't realize that it reads the names of these flags from a .pas file from the uses clause. I keep forgetting that in Pascal, it really "ain't no precompiler" in there, it's just a weird syntax.Warren P

2 Answers

6
votes

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;
3
votes

IMAGE_FILE_LARGE_ADDRESS_AWARE is declared in the Winapi.Windows unit. You must use that unit in order to be able to use the identifier.