godotengine / godot

Godot Engine – Multi-platform 2D and 3D game engine
https://godotengine.org
MIT License
90.76k stars 21.12k forks source link

Unable to build Godot #90953

Closed Zorochase closed 6 months ago

Zorochase commented 6 months ago

Tested versions

4.3 (master branch) 4.2 branch

System information

Windows 11

Issue description

I am aware this isn't really where I should be asking for help, but I've been ignored in all other channels and don't know where else to go.

In short, I'm trying to build Godot from source, and every attempt so far has failed.

I believe I have all the prerequisites:

I tried running scons target=editor platform=windows module_mono_enabled=yes after first cloning this repository and downloading it manually. The same error occurs. I tried running scons --clean with and without the compilation arguments. The same error occurs. I don't know what else to do or what I'm missing. I feel like it's something very simple and I'm very sorry for wasting everyone's time posting this here.

Here's the output I get no matter what I try differently.

What is "windows.h"? Is it related to my Visual Studio installation? Should I use MinGW instead? If so, how do I get scons to prefer a MinGW installation over Visual Studio?

Steps to reproduce

N/A

Minimal reproduction project (MRP)

N/A

AThousandShips commented 6 months ago

You need to open in the development console I think, the normal console doesn't have things set up properly normally

Zorochase commented 6 months ago

You need to open in the development console I think, the normal console doesn't have things set up properly normally

I'm sorry what do you mean by this? I've been using Windows Terminal to execute the commands.

AThousandShips commented 6 months ago

There's a special terminal with the visual studio kit, called "Developer Power Shell" and "Developer Command Prompt", try using any of those, they'll be in the start menu

Zorochase commented 6 months ago

There's a special terminal with the visual studio kit, called "Developer Power Shell" and "Developer Command Prompt", try using any of those, they'll be in the start menu

Just tried both, neither worked. Got the same error.

Edit: I also just tried running scons p=windows vsproj=yes which worked, and then tried to open the project in Visual Studio and execute the build from the terminal in there. Same error.

nongvantinh commented 6 months ago

I think your machine may be missing some necessary libraries, and the website where you uploaded your output seems to be down.

bruvzg commented 6 months ago

Since it6 not finding Windows header, Windows SDK might be missing, it should be a separate component in the VS installer, and I'm not sure if it's selected by default or with C++ compilers.

Zorochase commented 6 months ago

Since it6 not finding Windows header, Windows SDK might be missing, it should be a separate component in the VS installer, and I'm not sure if it's selected by default or with C++ compilers.

I opened the installer and switched to the "individual components" tab. Individual Components

If it helps, I did install Visual Studio to my D drive since my C drive has very little space.

Edit: should I be using one of the other unchecked SDKs? If so, I didn't see any mention of that anywhere in the docs. Also, here's an alternate link to the output.

huwpascoe commented 6 months ago

Run either echo PATH or $env:PATH command and lets see the output

Zorochase commented 6 months ago

Took screenshots of PowerToys environment variables menu instead so it'll be easier to read.

User Path: User Path

System Path: System Path

huwpascoe commented 6 months ago

Well there's definitely no reference to the SDK there. There should be paths like C:\Program Files (x86)\Windows Kits\10\include\10.0.22621.0\shared C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.37.32822\lib\x64

Maybe it'd help installing the Windows 10 SDK (or even reinstalling the whole development environment), maybe something went wrong because it's on D:\ and scons is confused.

Could try using ninja

py -m pip install ninja
scons ninja=yes [more args...]

Then call ./run_ninja_env.bat to build

Zorochase commented 6 months ago

Well there's definitely no reference to the SDK there. There should be paths like C:\Program Files (x86)\Windows Kits\10\include\10.0.22621.0\shared C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.37.32822\lib\x64

Got it to work by finding where these really were on my D drive and adding them to PATH. Thank you for your help.