Reputation: 3200
I have a 64 bit windows operating system and I use VS2008 to write my programs. I've noticed there are 3 compilers in the bin folder: an amd64 , x86_amd64 and one in the bin directory (at least I think it is !). I use SCONS to Compile my programs and when I use the --tree=all
in scons I can see that It uses the amd64 compiler. I have an Intel i5 processor and I have not specified which compiler to use in SCONS, so Why is it using amd64
?
From what I understand the x86_amd64
is used if you are on a 32-bit machine and wants to compile 64-bit programs, so is amd64 used for 64-bit programs regardless of the C.P.U ?, if that's the case then what is the purpose of the cl.exe
in the bin directory ?, Could someone explain this to me?.
Also, is there any way to see which compiler is being used by VS2008?. I can't find any info. in the build log.
Upvotes: 0
Views: 221
Reputation: 10357
If you need to change the C++ compiler used by SCons, you can modify the CXX
construction variable as mentioned here. (Im assuming you're using C++)
Here's an example of how I do it for one of my projects:
env.Replace(CXX = '/app/gcc/4.3.4/bin/c++')
env.Replace(CPP = '/app/gcc/4.3.4/bin/c++')
env.Replace(CC = '/app/gcc/4.3.4/bin/gcc')
env.Replace(LINK = '/app/gcc/4.3.4/bin/c++')
Notice these are linux paths, you'll have to insert and format the paths accordingly for Windows. This can be done easily and portably with the python os.path.join() function, like this:
import os
thePath = os.path.join('c:', 'dir1', 'subdir')
In this case, thePath should be "C:\dir1\subdir", so as you can see, you dont have to worry about forward or backward slashes.
Upvotes: 1
Reputation: 2815
cl.exe controls the compilers and the linker. :) see here and learneth :
http://msdn.microsoft.com/en-us/library/9s7c9wdw%28v=vs.80%29.aspx
i know its about vs 2k5 but still relevant.
everything else you stated was correct though from what i could tell.
i believe you can see the command line options for cl within the properties of VS. from there i believe if you run that command from the actual command line you can see the subsequent commands it issues to the compilers and the linker, at which point you can then see what compiler it used.
Upvotes: 1