So today I decided I would update to Visual Studio 2015 (previously running the RC version with no difficulties) but now my project does not like the /LARGEADDRESSAWARE
command line event.
I have a post-build event of:
call "$(DevEnvDir)..\tools\vsvars32.bat"
editbin /largeaddressaware "$(TargetPath)"
However I get the following error:
The command "call "C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE..\tools\vsvars32.bat" editbin /largeaddressaware "C:\...\bin\Debug\Application.exe"" exited with code 9009
Any thoughts?
I call a cmd script as a PostBuildEvent:
IF EXIST "%VS140COMNTOOLS%" CALL "%VS140COMNTOOLS%vsvars32.bat"
IF EXIST "%VS120COMNTOOLS%" CALL "%VS120COMNTOOLS%vsvars32.bat"
IF EXIST "%VS110COMNTOOLS%" CALL "%VS110COMNTOOLS%vsvars32.bat"
IF EXIST "%VS100COMNTOOLS%" CALL "%VS100COMNTOOLS%vsvars32.bat"
editbin.exe /LARGEADDRESSAWARE MyApp.exe
It checks for the environment variable according to the installed VS (first 2015, next 2013, next 2012 and finally 2010) and now all paths are fine.
If it still can't find the .exe, make sure the C++ Tools option in the installer is selected. By default VS2015 only installs C# and VB.net, but not C++ with its tools. Here you have to activate it under custom in the setup:
If you set your platform to "Any CPU" this flag is set for you by default now in Visual Studio 2015.
See Compiling C# with Any CPU sets Application can handle large (>2GB) addresses.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With