Here's how I did Visual Studio 2017 using the x64 toolkit, as per this answer:
Open your .vcxproj file with your favorite text editor, find this line:
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
Then add this right after it:
<PropertyGroup> <PreferredToolArchitecture>x64</PreferredToolArchitecture> </PropertyGroup>
This answer was for Visual Studio 2013, but it works in 2017 as well.
Additional note: However, it turned out that this did not actually solve my problem. The 64-bit toolbox consumed all the memory on my machine and made me reboot. When I roll back the latest code changes, it compiles using ~ 2.8 GB for the 32-bit compiler and compiles using ~ 4.2 GB for the 64-bit compiler (the last code consumes ~ 6.4 GB before freezing my task manager on my 8GB machine) . I will review the new code and try to understand why more memory is required.
source share