2011-10-19 9 views
7

私のアプリケーションで2GB以上のメモリを使用できるようにするために、私はGoogle検索し、IMAGE_FILE_LARGE_ADDRESS_AWAREコマンドを使用してそれを可能にしました。Delphi 2007 IMAGE_FILE_LARGE_ADDRESS_AWARE

だから私は、すべての使用および{$のR * .resファイル}行の後に、私のプログラムの.DPRファイルに

{$SetPEFlags IMAGE_FILE_LARGE_ADDRESS_AWARE} 

を追加しましたが、私は、コンパイル時に、私はエラーを取得します:

私は間違っていますか?

また、Windows 7 64bitでは、このコマンドを動作させるには起動設定を混乱させる必要がありますか、コマンドで32bitアプリケーションをコンパイルするだけです。

おかげで

+10

add 'Windowsを使用する ' –

+2

ありがとうございました! – KingOfKong

答えて

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ビットWindowsブートの調整なしで、自動的に4GBのアドレス空間を提供します。

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

実際の質問への答えはユニットWindowsを使用していますに追加することです。

関連する問題