Summary
I am trying to compile Unreal Engine project with a third party C++ library: dealii
. I managed to make it compile with dealii, however when I am running the engine it gets stuck on:
Loading PreDefault Module for Plugin: <PluginName>
The most confusing thing is that it stops on random plugins each time - so not plugin related.
And another pointer: it only gets stuck on loading if there is at least one member variable from dealii existing on some class. If I just #include
a header it loads just fine.
Please select what you are reporting on:
Engine
What Type of Bug are you experiencing?
Engine
Steps to Reproduce
- Compile dealii for Windows. Personally am compiling with the following vscode settings.json:
{
"cmake.sourceDirectory": "<folder>/dealii",
"cmake.buildDirectory": "<folder>/dealii_install",
"cmake.configureArgs": [
"-DCMAKE_EXPORT_COMPILE_COMMANDS=ON",
"-DCMAKE_BUILD_TYPE=Release",
"-DCMAKE_MSVC_RUNTIME_LIBRARY=MultiThreadedDLL",
"-DCMAKE_INSTALL_PREFIX=${workspaceFolder}/dealii_install",
"-DDEAL_II_CXX_FLAGS=/MD",
],
}
- Add the following parameters to make dealii compile:
Add this to Target.cs:
bOverrideBuildEnvironment = true;
AdditionalCompilerArguments += "/EHsc /bigobj /wd4668 /wd4068 /wd4244 /wd4267 /wd4996 /wd4355 /wd4800 /wd4146 /wd4667 /wd4520 /wd4700 /wd4789 /wd4808 /wd5037";
Add this to build.cs:
PublicIncludePaths.Add("<Folder>/dealii_install/include");
PublicIncludePaths.Add("<Folder>/dealii_install/include/deal.II/bundled");
PublicAdditionalLibraries.Add("<Folder>/dealii_install/lib/deal_II.lib");
PublicDefinitions.Add("KOKKOS_COMPILER_CUDA_VERSION=1");
PublicDefinitions.Add("BOOST_DISABLE_ABI_HEADERS=1");
PublicDefinitions.Add("BOOST_ALL_NO_LIB=1");
bUseRTTI = true;
- Create an empty C++ class with following:
#undef PI
#undef check
#include <deal.II/lac/sparse_matrix.h>
And then add the following private variable to the class:
dealii::Vector<double> sampleVector;
4. Compile and run the editor
Expected Result
Editor loads
Observed Result
Editor loading should get stuck at:
Loading PreDefault Module for Plugin:
Platform(s)
Windows