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 "$(DevEnvDir)..\tools\vsvars32.bat"
editbin /LARGEADDRESSAWARE "$(TargetPath)"
Another thing to understand is that if under the Debug tab in your project properties that the Enable the Visual Studio hosting process checkbox is checked (default), your application will not run with LARGEADDRESSAWARE (because the vshost.exe is not properly flagged). Uncheck that box to debug your application using LARGEADDRESSAWARE.