Packaging fails if Blueprint Nativization Method = Inclusive

I was able to package a shipping build for VR of the CesiumForUnrealSamples 01_CesiumWorld without a problem. The package is build, and it starts in VR (after I set the option Start in VR of course). Good stuff!

But when I set the Blueprint Nativization Method to “Inclusive” I got packaging errors, below you can find the first one, they are all similar.

Hope you can find the issue, I normally have this set to “inclusive” all the time for all projects. Would hate to change this or select it only for defined Blueprints.

Thanks & best
Andreas

UATHelper: Packaging (Windows (64-bit)): Building 8 actions with 20 processes…
UATHelper: Packaging (Windows (64-bit)): [1/8] Default.rc2
UATHelper: Packaging (Windows (64-bit)): [2/8] SharedPCH.Core.cpp
UATHelper: Packaging (Windows (64-bit)): [3/8] CesiumForUnrealSamples.cpp
UATHelper: Packaging (Windows (64-bit)): [4/8] SharedPCH.Engine.cpp
UATHelper: Packaging (Windows (64-bit)): [5/8] Module.NativizedAssets.gen.cpp
UATHelper: Packaging (Windows (64-bit)): The contents of are available only with C++17 or later.
UATHelper: Packaging (Windows (64-bit)): C:\Program Files\Epic Games\UE_4.26\Engine\Plugins\Marketplace\CesiumForUnreal\Source\ThirdParty\include\CesiumGeospatial/Ellipsoid.h(102): error C2039: ‘optional’: is not a member of ‘std’
UATHelper: Packaging (Windows (64-bit)): C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Tools\MSVC\14.29.30037\INCLUDE\cmath(714): note: see declaration of ‘std’
UATHelper: Packaging (Windows (64-bit)): C:\Program Files\Epic Games\UE_4.26\Engine\Plugins\Marketplace\CesiumForUnreal\Source\ThirdParty\include\CesiumGeospatial/Ellipsoid.h(102): error C2143: syntax error: missing ‘;’ before ‘<’
UATHelper: Packaging (Windows (64-bit)): C:\Program Files\Epic Games\UE_4.26\Engine\Plugins\Marketplace\CesiumForUnreal\Source\ThirdParty\include\CesiumGeospatial/Ellipsoid.h(102): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
UATHelper: Packaging (Windows (64-bit)): C:\Program Files\Epic Games\UE_4.26\Engine\Plugins\Marketplace\CesiumForUnreal\Source\ThirdParty\include\CesiumGeospatial/Ellipsoid.h(103): error C2238: unexpected token(s) preceding ‘;’

1 Like

Hi @Lildreas,

I’m afraid I haven’t used Blueprint Nativization and am only vaguely aware what it is… but based on your error message, you probably just need to enable C++17 support in the .Build.cs files in the Samples project. Find *.Build.cs in your project and add this line to it, inside the body of the constructor:

CppStandard = CppStandardVersion.Cpp17;

Let me know if that helps.

Kevin

Hi Kevin,

thanks for the fast help!

I added the line to the *.build.cs constructor and the project builds fine, but still on packaging with nativization enabled the packaging fails with the same error.

To Nativize Blueprints is good practise for all Blueprints that have lots of nodes or loops, for e.g. complex math stuff and AI. It will improve the performance because the Blueprints don’t have to be run in a VM to translate them to C++ during runtime.

So I would be awesome if you’d be able to look into this some more, at least all developers crreating VR/MR applications (like our VR flight simulator) are really trying hard to save every last millisecond.

Best
Andreas

BTW, some more info about nativization:

Thanks for reaching out, @Lildreas.

I’ve created an issue on our github repository for this here. It looks like this is definitely something that should be resolved. If you have any additional information, please feel free to add to the issue.

1 Like

I found a solution (a hackish workaround, but doable) and posted it on the github issue.

2 Likes