2

I've noticed that when I compile a 64-bit program from Visual Studio 2008, the compiler that runs is in the bin\x86_amd64 folder, not from the bin\amd64 folder -- even though both of them exist.

Is there any way to force the 64-bit compiler to run instead of the cross-compiler?

10
  • May I ask why do you care which compiler creates the 64-bit executable? The final result is the same, isn't it?
    – Eran
    Oct 11, 2011 at 8:10
  • @eran: I'm hoping the 64-bit version might be faster. And I feel it's a little pointless for it to be on the computer otherwise...
    – user541686
    Oct 11, 2011 at 8:24
  • what do you think will be faster? the compiler or the executable created?
    – stijn
    Oct 11, 2011 at 9:07
  • @stijn: The compiler, obviously.
    – user541686
    Oct 11, 2011 at 9:07
  • 64-bit compiler cannot be faster, but might be slower :-). AFAIR dynamic_cast in 64-bit code is few times slower than in 32-bit code
    – Jurlie
    Oct 11, 2011 at 9:08

1 Answer 1

3

go to Tools->Options->Projects and Solutions->VC++ Directories, then select x64 for platform and select Executable Files. This list is like a PATH environment variable for everything started from within VS, including compiler/linker/debugger etc.

Normally the first line will be

$(VCInstallDir)bin\x86_amd64

so changing this to

 $(VCInstallDir)bin\amd64

will pick cl.exe etc from that directory instead.

2
  • Ahhhhh that's exactly what I was looking for, thanks a bunch! It helps with a lot of other things as well. :)
    – user541686
    Oct 11, 2011 at 9:09
  • yeah it's a great feature - I even used it to run the VS2010 compiler etc within VS2008 as I like it better.
    – stijn
    Oct 11, 2011 at 9:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.