0 votes

Hello!

When running scons -j6 platform=windows vsproj=yes with Visual Studio 2017, I can't generate a Visual Studio solution.

Compiling normally works just fine. I'm running in the Visual Studio developer command prompt.

scons -j6 platform=windows vsproj=yes
scons: Reading SConscript files ...

scons: warning: No version of Visual Studio compiler found - C/C++ compilers most likely not set correctly
File "D:\Documents\Projects\Godot\godot\SConstruct", line 3, in <module>

scons: warning: No version of Visual Studio compiler found - C/C++ compilers most likely not set correctly
File "D:\Documents\Projects\Godot\godot\SConstruct", line 63, in <module>
Configuring for Windows: target=debug, bits=default
Found MSVC compiler: x86
Compiled program architecture will be a 32 bit executable. (forcing bits=32).
YASM is necessary for WebM SIMD optimizations.
WebM SIMD optimizations are disabled. Check if your CPU architecture, CPU bits or platform are supported!
UnsupportedVersion: Unknown version None:
  File "D:\Documents\Projects\Godot\godot\SConstruct", line 486:
    methods.generate_vs_project(env, GetOption("num_jobs"))
  File "D:\Documents\Projects\Godot\godot\methods.py", line 555:
    batch_file = find_visual_c_batch_file(env)
  File "D:\Documents\Projects\Godot\godot\methods.py", line 541:
    return find_batch_file(env, version, host_platform, target_platform)[0]
  File "c:\program files (x86)\microsoft visual studio\shared\python36_64\lib\site-packages\scons\SCons\Tool\MSCommon\vc.py", line 308:
    pdir = find_vc_pdir(msvc_version)
  File "c:\program files (x86)\microsoft visual studio\shared\python36_64\lib\site-packages\scons\SCons\Tool\MSCommon\vc.py", line 271:
    raise UnsupportedVersion("Unknown version %s" % msvc_version)

SCons is up to date:

scons --version
SCons by Steven Knight et al.:
        script: v3.0.3.27552f9e8d59c13c3567f2bd380b74e34ee25324, 2019-01-08 02:59:02, by bdbaddog on hpmicrodog
        engine: v3.0.3.27552f9e8d59c13c3567f2bd380b74e34ee25324, 2019-01-08 02:59:02, by bdbaddog on hpmicrodog
        engine path: ['c:\\program files (x86)\\microsoft visual studio\\shared\\python36_64\\lib\\site-packages\\scons\\SCons']
Copyright (c) 2001 - 2019 The SCons Foundation

I know in the past SCons had issue with Visual Studio 2017 -- is that still the case? Is there any other way to generate a solution file which will work in Visual Studio 2017?

Thanks!

asked Jan 11, 2019 in Engine by Jay2645 (32 points)

1 Answer

+1 vote
Best answer

There are ongoing issues with using SCons 3.0.3 + Visual Studio with Godot, so you should probably downgrade to SCons 3.0.1 for now.

answered Jan 11, 2019 by Calinou (6,336 points)
selected Jan 11, 2019 by Jay2645

Downgrading fixed it. Thank you!

Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read How to use this Q&A? before posting your first questions.