I have been working on upgrading our engine from 4.15 to 4.19 and came across an issue with the automatic builder one of my predecessors set up. It makes use of the Unreal Automation Tools to compile, build, and package the project. After further inspection, I noticed that the BuildTarget command was removed from UAT in 4.17. I have tried simply commenting out the troublesome code but that throws errors when it makes it to the BuildCookRun cycle. The line that no longer runs is
Still having trouble with this but I believe I have gotten a bit farther. I replaced the RunUAT BuildTarget call with a call to Build.bat and it seems to be compiling. The new issue I am facing is that the BuildCookRun sequence is halting when it tries to build a server .exe and spits out the following error:
libeay.lib(rand_win.obj) : error LNK2019: unresolved external symbol BCryptGenRandom referenced in function RAND_poll
I am unsure if this has something to do with the new way of building the project source but I cannot find the calls referenced in the error anywhere in the code and the only thing I have to go from is that it is a
Windows function. The builder is working on a Windows Server 2012R and it is trying to build in VS2015.
The old BuildTarget command was a simple wrapper for executing UnrealBuildTool, so calling Build.bat directly is the correct replacement. You can always run a package command from the editor and see the command line that was executed in the output log.
The BCryptGenRandom function was introduced in Windows Vista. We target the Windows 8.1 SDK by default. Do you have it installed?
Linked are the output logs of the Automated Builder (which fails on the BuildCookRun cycle of the server) and the building of the project in VS on a local workspace
Your Visual Studio log is from building the editor, not the server target of your game (you can change this from the configuration drop-down in Visual Studio).
It sounds like you’re missing a dependency on bcrypt.lib. Try adding this to your game’s .build.cs file: