简体   繁体   中英

Running 32bit Borland XE2 app under Win 7 64bit with /3gb switch (-GF LARGEADDRESSAWARE )?

As the title states, I am running a 32 bit application under win 7 64 bit. The application is made in C++ in Embarcadero XE2. I need more than 2GB of memory.

Steps: - I enabled the 3GB switch and I rebooted the pc. - I tried adding -GF: LARGEADDRESSAWARE to project options/c++ linker/Output Flags but then linking failed. It said: "Failed command GF:" or something like that. I then found on a forum that you should do it manually in the .bpr file under FLAGS section. I added the flag and then the project linked. However, my memory available indicator in the app tells me i'm still getting under 2 GB.

Questions: 1. how to properly make this work ? 2. how to tell if I got 3gb of memory or not?

Thank you in advance

The /3GB switch is for 32 bit systems only. Your system is a 64 bit system. That means that a 32 bit executable with the LARGEADDRESSAWARE PE flag will have a 4GB address space. Don't attempt to use the /3GB boot option.

You can check whether or not your executable has the LARGEADDRESSAWARE PE flag set by using any PE viewing tool. With the MS toolchain you would use dumpbin . The Embarcadero toolchain equivalent is tdump . In addition, there are countless GUI PE viewers. Find a tool that works and make sure that you have properly set this PE flag.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM