Force VS to use 64Bit toolset

#1

So apparently VS is running the 32Bit toolset by default for whatever reason. Therefore I can’t compile since I’m breaching the 4GB RAM limit on compilation.

I found an answer to force 64Bit, where you edit your .vxproj file, but that would be overriden by JUCE on next save. The other solution was to add an environment variable like so:

set PreferredToolArchitecture=x64
devenv

I tried to run it in a terminal but it doesn’t seem to know ‘devenv’.
I’m really not familiar with this business they call “Windows”, thanks for any help!

#2

You need to clear up your context here - I haven’t a clue which editor you’re inferring: Visual Studio or vscode?

#3

Ok sorry. I’m talking about VisualStudio 2017 Express. Its internal compiler is set to the 32Bit variant, and hence can only use 4GB of memory on compilation. I’m looking to use the 64Bit variant.

Also, there’s a command line compiler identical to the internal VSC++ (called msbuild) and I’d also be happy to use this one in the 64Bit edition

EdIt: To clarify: I’m NOT looking to compile a 64Bit app, I want the compile tools themselves to be 64Bit.

#4

I have previously done this, but don’t recall the exact steps. googling something like “visual studio 2017 enabling 64 bit toolset” should help… :slight_smile: The first result I get is:
https://docs.microsoft.com/en-us/cpp/build/how-to-enable-a-64-bit-visual-cpp-toolset-on-the-command-line?view=vs-2019

1 Like
#5

I think we just set that PreferredToolArchitecture=x64 as an environment variable in Windows.
I can’t think of any reason why you wouldn’t want to use them?

2 Likes
#6

You may want to check out this thread:

Rail

2 Likes