[Scons-users] Code not rebuilt when switching between two VisualStudio versions

Mats Wichmann mats at wichmann.us
Thu Mar 25 11:42:57 EDT 2021


On 3/25/21 1:54 AM, Steve Hill (Wireless) via Scons-users wrote:
> Hi all,
> 
> We are using SCons 3.1.2 and are evaluating moving from MSVS 2017 to 
> MSVS 2019. We have provided a mechanism to switch the setting of 
> MSVS_VERSION/MSVC_VERSION from 14.1 to 14.2 when the Environment is 
> created, and this works well when building clean or incrementally with 
> the same toolchain. However, if switching between toolchains, the C/C++ 
> files don’t get rebuilt and, as soon as one file is changed and rebuilt 
> so that the linker is invoked, we get a linker failure. It is almost 
> like the compiler is not included as a dependency of the object file? 

It should be - you should be able to see the compiler as a dependency if 
you run scons with --tree=prune option, and you can later dump the 
database to see stored signatures with the sconsign command.

> Can anyone give me a clue as to how to ensure that the files are 
> correctly rebuilt (ideally without having to change the places where the 
> files are added into SCons, as our codebase is quite large.)

The thing to check would be if the toolchain is actually switching... 
there's been several iterations of fixing up selecting the right one 
when there are multiple chains installed, some of those may have come 
after 3.1.2.  Memory is hazy as to the timeline...



More information about the Scons-users mailing list