Can I set LARGEADDRESSAWARE from within Visual Studio?
Solution 1:
Building on @RouMao's answer, you may get an error message saying that editbin cannot be found. Ensure that the environment in the post-build event command line is setup properly by specifying as follows:
call "$(VS100COMNTOOLS)..\tools\vsvars32.bat"
editbin /largeaddressaware $(TargetPath)
Another thing to understand is that your LARGEADDRESSAWARE
enabled application will not run in debugging mode when (under the Debug
tab in your project properties) the Enable the Visual Studio hosting process
check-box is checked (which it is by default), because the vshost.exe
is not properly flagged.
Uncheck that box to debug your application using LARGEADDRESSAWARE
.
Solution 2:
You can do it as a Post-build task. In "Build Events" tab, put following command
editbin /largeaddressaware $(TargetPath)
into the "Post-build event command line:"
This is the case for VS2008. I think it should work in the same way for VS2010.