Search code examples
c++windowsvisual-studioscons

scons doesn't find visual studio


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.


Solution

  • 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.