2011-10-19 13 views
7

Voglio la mia domanda per essere in grado di utilizzare più di 2 GB di memoria, I googled intorno e ha scoperto che il comando IMAGE_FILE_LARGE_ADDRESS_AWARE mi permette di fare questo.Delphi 2007 IMAGE_FILE_LARGE_ADDRESS_AWARE

così ho aggiunto

{$SetPEFlags IMAGE_FILE_LARGE_ADDRESS_AWARE} 

Per file di .dpr del mio programma, dopo che tutti gli usi e il {$ R * .res} linea,

ma quando compilo, ottengo l'errore:

E2003 Undeclared identifier: 'IMAGE_FILE_LARGE_ADDRESS_AWARE' 

Cosa sto sbagliando?

Inoltre, su Windows 7 a 64 bit, ho bisogno di scherzare con le impostazioni di avvio per questo comando per funzionare, o semplicemente compilare un'applicazione a 32 bit con il comando e farà tutto il resto automaticamente?

Grazie

+10

add 'usa Windows' –

+2

Grazie, che ha funzionato! – KingOfKong

risposta

5

Also, on Windows 7 64bit, do I need to mess around with boot settings for this command to work, or just compile a 32bit application with the command and it will do everything else automatically?

64-bit di Windows forniranno 4 GB di spazio di indirizzi automaticamente, senza ritocchi di avvio.

http://msdn.microsoft.com/en-us/library/windows/desktop/bb613473%28v=vs.85%29.aspx:

To enable an application to use the larger address space, set the IMAGE_FILE_LARGE_ADDRESS_AWARE flag in the image header. The linker included with Microsoft Visual C++ supports the /LARGEADDRESSAWARE switch to set this flag. Setting this flag and then running the application on a system that does not have 4GT support should not affect the application.

On 64-bit editions of Windows, 32-bit applications marked with the IMAGE_FILE_LARGE_ADDRESS_AWARE flag have 4 GB of address space available.

5

La risposta alla domanda reale è quello di aggiungere utilizza l'unità Windows.

Problemi correlati