UnrealEngineHTML5 / Documentation

540 stars 183 forks source link

Build errors when trying to build UnrealHeaderTool #109

Closed ojocs closed 3 years ago

ojocs commented 3 years ago

As the title suggests, I get build errors upon trying to build UnrealHeaderTool. I'm using VS 2019, and I had some difficulties before with running HTML5Setup.sh. I resolved these by deleting the Engine/Platforms/HTML5/emsdk directory as per another resolved issue on here.

When I ran GeneratedProjectFiles.bat, I got:

Setting up Unreal Engine 4 project files...
ERROR: NODEJS NOT FOUND: C:\ue4-4.24.3-html5\Engine\Platforms\HTML5\Build\emsdk\emsdk-1.39.18\node\12.18.1_64bit\bin\node.exe
*** NODE_JS NOT FOUND: error_nodejs_not_found
*** PYTHON NOT FOUND: C:\ue4-4.24.3-html5\Engine\Platforms\HTML5\Build\emsdk\emsdk-1.39.18\python\3.7.4_64bit\python.exe
*** NODE_JS NOT FOUND: error_nodejs_not_found
*** PYTHON NOT FOUND: C:\ue4-4.24.3-html5\Engine\Platforms\HTML5\Build\emsdk\emsdk-1.39.18\python\3.7.4_64bit\python.exe
Binding IntelliSense data... 100%
Writing project files... 100%

I figured it was ok, so I kept on going and built the things within VS 2019 as stated in the Compile Support Programs section here https://github.com/UnrealEngineHTML5/Documentation/blob/master/Platforms/HTML5/HowTo/README.0.building.UE4.Editor.md

And then I tried building UnrealHeaderTool and got errors due to the files MacSystemIncludes.h and MacPlatformCompilerSetup.h

I'm using Windows, so I'm a bit confused about getting errors for these files. A lot of the errors are basically

cannot open source file "copyfile.h"

for example.

There's also

identifier "__clang_major__" is undefined

and

identifier "int32" is undefined

Any help would be appreciated!

hotaku6kun commented 3 years ago

Ok, some things you might want to check: a) Are your ENV values correctly set? I mean Windows env values such as NODE_JS and PYTHON, because it's looking for them b) are you sure you have the specified version? because if you have a different one the generate projects file will never find it since its looking for 12.18.1_64bit when in reallity it just has (for example) 11.17.1_64bits or other version.

ojocs commented 3 years ago

Hi, thank you for responding! I had set the ENV values, and double checked them as well. For the versions, I have Nodejs is v14.17.6 and Python 3.9.7. Do I need to downgrade then?

ojocs commented 3 years ago

So apparently the solution for me ended up being to just rename the folders to be ..\node\12.18.1_64bit.. and ..\python\3.7.4_64bit..

Before they were named my versions of Nodejs and Python. I'm still building things right now in VS, so I still have to see if this wasn't hacky and messed things down the line. But for now this seems to work. I'll close the issue and update later if needed.