4

I have a problem with scons when I try to build a c++ project.

I'm running the build batch file inside the developer command prompt for vs2015.

The following output gets generated.

scons: warning: No installed VCs

File "C:\OmahaLibraries\swtoolkit\site_scons\site_init.py", line 426, in SiteInitMain

scons: warning: No version of Visual Studio compiler found - C/C++ compilers most likely not set correctly

File "C:\OmahaLibraries\swtoolkit\site_scons\site_init.py", line 426, in SiteInitMain

scons: Reading SConscript files ...

scons: warning: No installed VCs

File "C:\OmahaLibraries\swtoolkit\site_scons\site_tools\target_platform_windows.py", line 283, in generate

scons: warning: No version of Visual Studio compiler found - C/C++ compilers most likely not set correctly

File "C:\OmahaLibraries\swtoolkit\site_scons\site_tools\target_platform_windows.py", line 283, in generate

Has anybody an idea why I get this result? I could not found any sources how scons searches for vc.

Community
  • 1
  • 1
NtFreX
  • 10,379
  • 2
  • 43
  • 63
  • 2
    Which version of SCons are you using? Support for VS2015 should be included in release 2.3.6 (31 Jul 2015) and upward... Check http://stackoverflow.com/questions/30405738/scons-cant-locate-any-tools for how to enable debugging of the VS detection logic. Report back your findings if possible to the User Mailing list at scons-users@scons.org (see [http://scons.org/lists.html](http://scons.org/lists.html)). That's where you can meet the experts for this matter directly... – dirkbaechle Jul 29 '16 at 11:57
  • oh what.. I'm using 1.3.1 but google told me it can be built with vs2015... – NtFreX Jul 29 '16 at 11:59
  • it's part of the developer setup guide of the google omaha client. https://github.com/google/omaha/blob/master/doc/DeveloperSetupGuide.md – NtFreX Jul 29 '16 at 12:00
  • Well, that would explain things...;) – dirkbaechle Jul 29 '16 at 12:00
  • ok I just recognized that on my other computer where it's working a vc2005 is installed and used to compile... – NtFreX Jul 29 '16 at 12:04
  • 1
    I just checked the link and am not sure where they get the information from that SCons 2.x versions wouldn't be compatible with 1.3.1? Seems bogus to me...you may watch out and simply try for yourself. If you encounter further problems, please come to our User ML so we can help you out. – dirkbaechle Jul 29 '16 at 12:05
  • I just trusted them.. maybe a bad idea^^ it's explained that scons 1.3.1 is needed and either vs 2015 with win sdk 10 or vs 2008 with win sdk 8.1. this means it should work with 2015.. I'll further test this. thanks for your help – NtFreX Jul 29 '16 at 12:07
  • @Dr.Fre Did you figure this out? – Alexander May 15 '17 at 17:09
  • @Dr.Fre What exactly was your problem? I keep getting scons: warning: No installed VCs – Alexander May 15 '17 at 17:39

2 Answers2

2

To generate a logfile of scons' Visual Studio detection locig set the SCONS_MSCOMMON_DEBUG environment variable to a file location.

In my case I had to install a Visual Studio 2005 to get it working. Also be aware of that the Developer Command Prompt for Visual Studio sets a bunch of environment variables at the start. I also needed those to be set for my project to build.

NtFreX
  • 10,379
  • 2
  • 43
  • 63
  • Weird. VS 2015 and 2017 don't set up any environmental variables I can see. – Alexander May 15 '17 at 18:41
  • If you bring up the developer shell at least up to VS 2015 do. However they are not set globally. Up to 2015 there are several registry entries used to find the batch file script that sets the needed environment variables, SCons uses that info to set the appropriate environment variables. – bdbaddog May 15 '17 at 19:00
  • Running the command from inside Visual Studio 2022's Developer Command Prompt is what worked for me. Thanks! – jsea Mar 04 '22 at 12:09
0

When I tried to use scons 4.2.0 with Visual Studio 2022, scons wasn't able to find the Visual Studio compiler. I solved this issue by using pip to install scons 4.3.0 instead.

KBurchfiel
  • 635
  • 6
  • 15