Errors Unreal Compile

From PSwiki
Jump to navigation Jump to search

Can't find 'mysql.h'

 2>c:\users\[username]\documents\unreal projects\[project name]\psunreal\source\psunreal\util/SQLWrapper.h(7): fatal error C1083: Cannot open include file: 'mysql.h': No such file or directory

You need to install MariaDB Connector from:

  1. Select C++ connector and the platform you need
  2. From the MariaDB install directory, copy both lib/ and include/ (with subfolders) into PSUnreal\ThirdParty\MariaDB\
  3. Right-click on PSUnreal.uproject and select Generate project files

Cannot open 'stdio.h'

 fatal error C1083: Cannot open include file: 'stdio.h': No such file or directory

When installing VS2017 I got this error while compiling Wordnet.

The file is under C:\Program Files (x86)\Windows Kits\10\Include\10.0.15063.0\ucrt

You need to go to the project Properties and retarget the SDK to this one:

  • Project->Properties->General->Windows SDK Version->10.0.xxxxx or
  • Project->Retarget solution->Windows SDK Version: 10.0.xxxxx

Cannot open 'Wordnet.lib'

 fatal error LNK1181: cannot open input file 'C:\Users\[Username]\Documents\Unreal Projects\[Project Name]\PSUnreal\ThirdParty\Wordnet\lib\x64\Wordnet.lib'

Compile Worldnet.sln, then copy the resulting lib from x64\Release\Wordnet.lib to PSUnreal\ThirdParty\Wordnet\lib\x64\

Cannot load libmariadb.dll at runtime

When starting PSUnreal\Scripts\server.bat you get an error libmariadb.dll cannot be found.

Copy libmariadb.dll from PSUnreal\ThirdParty\MariaDB\lib to PSUnreal\Binaries\Win64


 >	UE4Editor-Engine.dll!FShaderCompilingManager::ProcessCompiledShaderMaps(TMap<int,FShaderMapFinalizeResults,FDefaultSetAllocator,TDefaultMapKeyFuncs<int,FShaderMapFinalizeResults,0> > & CompiledShaderMaps, float TimeBudget) Line 1210	C++

Need to open your project sln, go under Programs and compile "ShaderCompileWorker" project

Error on startup after switching branches

 GetObjectArrayForDebugVisualizersDelegate@FCoreDelegates@@SAA .....

This was happening after switching from release branch (which contained 4.11 preview) to 4.10 branch. I checked and the file C:\Users\Luke\Documents\Unreal Projects\MyProject2\Binaries\Win64\UE4Editor-MyProject2.dll was old. I deleted all files older than today, then used

* git reset --hard
* git checkout .


Error while building lights from the editor

 LogStaticLightingSystem:Warning: Failed to build lighting!!! Lighting build failed. Swarm failed to kick off.

Need to open UE4.sln from Visual Studio, go under Programs and recompile UnrealLighmass

Could not find the code file "... MyCharacterTest.h" after hot reload

For testing purposes I renamed one C++ class from MyCharacterTest to psCharacter. Now if

  • I launch the editor from within VS I see it as the latest version, so psCharacter
  • if I launch the editor with a script, namely: C:\UnrealEngine\Engine\Binaries\Win64\UE4Editor.exe


I searched that string in the whole PSUreal dir by text string, and was found inside: C:\Users\Luke\Documents\Unreal Projects\MyProject2\PSUnreal\Binaries\Win64\UE4Editor-PSUnreal.dll which actually its old, last updated 12-Nov-2017

I clicked on compile from editor, it created a new file: UE4Editor-PSUnreal-104.dll in the same directory (why 104 anyway?) and then relaunching the editor I see the class with proper name

I see inside UE4Editor.modules he changed one line, adding the new hot reloaded dll to it:

	"Modules" : 
		"PSUnreal" : "UE4Editor-PSUnreal-104.dll"

function XXX already has a body (with constructor)

I was trying to add my own constructor to APlaneShiftGameState, but I was getting this error:

  Error	C2084	function 'APlaneShiftGameState::APlaneShiftGameState(const FObjectInitializer &)' already has a body	PSUnreal	C:\Users\Luke\Documents\Unreal Projects\MyProject2\PSUnreal\Source\PSUnreal\PlaneShiftGameState.cpp	7	

The reason is that I had GENERATED_BODY() instead of GENERATED_UCLASS_BODY() in the .h

The following modules are missing or built with a different engine version

Check that the directory \PSUnreal\Binaries\Win64 has the following files up to date:


also check that there has been no hot reload in the UE Editor, you can remove this by editing the file: UE4Editor.modules and check its pointing to the right DLL. Hot reload files have a -XXX number at the end.

USTRUCT , UPROPERTY in non Unreal Engine class

I have a messages.h class which includes a bunch of USTRUCT and UPROPERTY declarations, and this file was not compiling giving me the error of :

Error (active) member "FpsCharacterDetailsMessage::FName" is not a type name PSUnreal\net\messages.h 53

I solved it by adding at the top this line:

  #include "messages.generated.h"

which seems to be needed whenever you have a U* declaration in a class which is not default UE class.

The breakpoint will not currently be hit. The source code is different from the original version

Look in PSUnreal\Binaries\Win64 and check the .dlls present there. Most likely you have more than one which starts with UE4Editor-PSUnreal* , ensure the last one compiled is then mentioned into this file: UE4Editor.modules

Unable to load module UE4Editor-PSunreal-Win64-DebugGame.dll because the file coundn't be loaded by the OS.

Ensure libmariadb.dll and zlib.dll are in the system PATH or move those in PSUnreal\Binaries\Win64

Loading freezes at 45% in the UE splash screen

The editor is recompiling shaders, give him a LOT of time, and it will proceed, its actually doing something.