[Scons-dev] SCons building with MS Visual C++10 on 64-bit Windows.

Kenny, Jason L jason.l.kenny at intel.com
Fri Jun 15 12:23:00 EDT 2012


I recall chiming in on this. As I help a bit with this rewrite.

I honestly found it better to be precise and error out if that is not the case. The difference is for example in the Parts addon you would say this:

Scons mytarget

Just like you would with scons. The difference is that this builds 64-bit on a 64-bit system and 32-bit on a 32-bit system. If the compiler is not installed you get this type of message:

scons: *** Version of 10 of MSVC not found for target win32-x86_64. Found version are ['9.0']
File "C:\Users\jlkenny\code\parts\parts\__init__.py", line 7, in <module>

As in this case the system does not have vc 2010 64-bit install, but it does have 9 versions.

If you want to build 32-bit you would say:

scons --target=x86 mytarget

and it would work. If I then want to do a 32-bit vc 9 you would say:

scons --target=x86 --tool-chain=cl_9

The main point here is that while it is great the scons tries to find a compiler, I don't believe it should try to cross build for you automatically. That part should be clear.

Given the current SCons code the user should be able to say:

scons mytarget TARGET_ARCH=x86

and get a 32-bit build vs a 64-bit one.

Jason


More information about the Scons-dev mailing list