I’m running into an issue while trying to package cesium-unreal for Windows and Android.
After reviewing the documentation on GitHub, I understand that performing the following steps, sequentially, should result in a successful cross-compilation for Windows and Android:
The issue arises during the final step. Output from the command line is:
------ Building 21 action(s) started ------
[1/21] Resource Default.rc2
[2/21] Resource Default.rc2
[3/21] Compile [x64] PCH.CesiumRuntime.cpp
Detected compiler newer than Visual Studio 2022, please update min version checking in WindowsPlatformCompilerSetup.h
[4/21] Compile [x64] PCH.CesiumEditor.cpp
Detected compiler newer than Visual Studio 2022, please update min version checking in WindowsPlatformCompilerSetup.h
[5/21] Compile [x64] Module.CesiumRuntime.7.cpp
[6/21] Compile [x64] Module.CesiumRuntime.2.cpp
[7/21] Compile [x64] Module.CesiumRuntime.1.cpp
[8/21] Compile [x64] Module.CesiumEditor.cpp
[9/21] Link [x64] UnrealEditor-CesiumEditor.lib
Creating library C:\Users\user\Desktop\CesiumForUnreal_5_3\HostProject\Plugins\CesiumForUnreal\Intermediate\Build\Win64\x64\UnrealEditor\Development\CesiumEditor\UnrealEditor-CesiumEditor.lib and object C:\Users\user\Desktop\CesiumForUnreal_5_3\HostProject\Plugins\CesiumForUnreal\Intermediate\Build\Win64\x64\UnrealEditor\Development\CesiumEditor\UnrealEditor-CesiumEditor.exp
[10/21] Compile [x64] Module.CesiumRuntime.6.cpp
[11/21] Compile [x64] Module.CesiumRuntime.3.cpp
[12/21] Compile [x64] Module.CesiumRuntime.4.cpp
[13/21] Compile [x64] Module.CesiumRuntime.11.cpp
[14/21] Compile [x64] Module.CesiumRuntime.5.cpp
[15/21] Compile [x64] Module.CesiumRuntime.8.cpp
[16/21] Compile [x64] Module.CesiumRuntime.10.cpp
[17/21] Compile [x64] Module.CesiumRuntime.9.cpp
[18/21] Link [x64] UnrealEditor-CesiumRuntime.lib
Creating library C:\Users\user\Desktop\CesiumForUnreal_5_3\HostProject\Plugins\CesiumForUnreal\Intermediate\Build\Win64\x64\UnrealEditor\Development\CesiumRuntime\UnrealEditor-CesiumRuntime.lib and object C:\Users\user\Desktop\CesiumForUnreal_5_3\HostProject\Plugins\CesiumForUnreal\Intermediate\Build\Win64\x64\UnrealEditor\Development\CesiumRuntime\UnrealEditor-CesiumRuntime.exp
[19/21] Link [x64] UnrealEditor-CesiumEditor.dll
LINK : fatal error LNK1181: cannot open input file 'C:\Users\user\Desktop\CesiumForUnreal_5_3\HostProject\Plugins\CesiumForUnreal\Source\CesiumEditor\..\ThirdParty\lib\Windows-x64\CesiumIonClient.lib'
[20/21] Link [x64] UnrealEditor-CesiumRuntime.dll
LINK : fatal error LNK1181: cannot open input file 'C:\Users\user\Desktop\CesiumForUnreal_5_3\HostProject\Plugins\CesiumForUnreal\Source\CesiumRuntime\..\ThirdParty\lib\Windows-x64\async++.lib'
Total time in Parallel executor: 127.86 seconds
Total execution time: 132.38 seconds
Took 132.46s to run dotnet.exe, ExitCode=6
UnrealBuildTool failed. See log for more details. (C:\Users\user\AppData\Roaming\Unreal Engine\AutomationTool\Logs\C+Program+Files+Epic+Games+UE_5.3\UBT-UnrealEditor-Win64-Development.txt)
AutomationTool executed for 0h 2m 39s
AutomationTool exiting with ExitCode=6 (6)
BUILD FAILED
The error makes sense, because when I look at the directory in question, …\ThirdParty\lib, the only directory inside is Android-xaarch64. The Windows-x64 directory does not exist.
I assume that I have made a mistake in my build process. I’m new to cross-compilation, and any help is greatly appreciated.
Thank you for providing the steps you took, as well as the logs. I’m noticing some (potentially) conflicting things in your process? First, it looks like you’re using Visual Studio 15 (2017) to build for Windows, according to this line:
cmake -B build -S . -G "Visual Studio 15 2017" -A x64
But then I see this in the log:
Detected compiler newer than Visual Studio 2022, please update min version checking in WindowsPlatformCompilerSetup.h
Seems to be contradictory So, I just want to confirm what version of Visual Studio are you actually using in Unreal? I believe you can check it under the Project Settings.
Janine’s question is a good one, but I wanted to throw a couple more questions your way while I’m looking at this and thinking of it…
Am I understanding correctly that you’re trying to build the plugin yourself, rather than use the pre-built binaries provided by Cesium or Epic?
If so, the best “documentation” for this is how we build and package the plugin on our CI system. Take a look at the “Android53” step in this file:
(or Android52 or Android54 if you’re using UE 5.2 or 5.4)
Most of the work is delegated to here:
These steps happen on a standard GitHub Actions runner, so if they’re not working in your environment, you should be able to work out what’s different between your environment and GitHub’s. The list of installed software is here (but you definitely don’t need all of it to build Cesium for Unreal):
You bring up a good point. I’ll try to debug the reason for that error message, but I assumed that the ‘-T v141’ flag on the Windows build would be sufficient for telling CMake to use the correct MSVC build tools. I should have included this in my original post though. Good catch!
Thanks for the reply! This is great info. I will come back to this in a few weeks time and try again. That is definitely the info that I needed. Appreciate your time and all the hard work on the source.
Hey guys I finally circled back to compiling and… haha. Tried to do it the old fashioned way again and ended up with a new set of issues. Decided to learn GitHub Actions after reading through @Kevin_Ring ’s reply and glad I did.
Okay so I’m going to fork since I need to change a few compiler flags for my app. I’m a little bit confused on how to setup an S3 bucket like the one y’all use though. Where are you getting the .zip files for UE?
I mean, I can set up the S3 bucket, but I don’t know what’s inside those zip files. Waiiiit… I think I found it. Is that what those install-unreal-linux/macos/windows files are doing? That would make sense. Okay, now I’ve gotta remember how to use AWS…
Those ZIP files are just a standard Unreal Engine installation, zipped up.
You don’t actually need to use GitHub Actions or AWS, though. I’m just suggesting that you follow the same sequence of steps that our CI system follows, because that will be the most reliable way to produce a build.
Last question: for the last step of the process (Combine52, Combine53, etc…), do you do any manual work with the artifacts before uploading to the release page? I’m trying to figure out if I need to merge my android and windows built packages into one package.