Issues building Godot source C++ with SCons; Unknown 'vsproj' variable

Godot Version

4.4

Question

Hi all,

I’m tyring to build Godot source with SCons, so I can create a project with C++. I’m new to using SCons, and am running into issues generating a visual studio solution file. When following the setup documentation, I tried running the following line in Powershell that was in the directory:

scons platform=windows vsproj=yes dev_build=yes

However, I get the following warning at the beginning of running scons:

WARNING: Unknown SCons variables were passed and will be ignored:
    vsproj=yes

Anyone else encounter this issue? I had Visual Studio 2022 installed on my machine before I installed SCons. I couldn’t find anything in the documentation that called this out, but Is there some extra configuration to SCons that I need for it to generate Visual Studio solutions?

Thanks in advance for your help.

I dont see why it wouldnt work, but maybe the dev_build option is interfering, or causing it to spit out superfluous logs. You can try changing it to debug_symbols=yes

I think the dev_build is for someone changing the engine.

Thanks for the suggestion! Unfortunately, it doesn’t seem to solve my issue - I’m still getting a warning about the unrecognized vsproj variable.

I took a closer look at the SConstruct file in the repo, the file doesn’t seem to specify what to do with a vsproj variable at all. Would handling for that variable be handled elsewhere, or is it something native to SCons?

Are you sure you are checked out to your desired release? cus im on 4.4-stable tag and the option is in Sconstruct for me.

Maybe a different question, is this godot_src or godot_c++ repo?

I’m currently trying to build the godot-cpp repository - my understanding was that I needed that to work in Godot using C++.

Checking the Godot Repository, I see now that repo’s SConstruct file has a vsproj variable. Could I build that one and still be able to work in C++?

I’m not sure, I’m not a visual studio expert. you could try to manually build a solution.

I also found this project you could probably bend to your needs.

I found this discussion but it may not bare any fruit.

1 Like

Thanks for the links! I think this resolved this issue.

I may have jumped the gun in downloading godot-cpp. That repo is specifically for GDExtensions API - not the engine itself. Cloning the Godot 4.4 repo and running my original scons command on that built the project with a visual studio solution, and all of the files seems to already be in C++.

In hindsight, I think I misread the documentation and jumped ahead. :sweat_smile:

Thanks again for your help!

1 Like