Hi , sorry to bother you again.
Since the prototype is now more or less finished I’m currently at rewriting everything in C++, in Editor it works finde, but as soon as I package the game (cooked) I get these errors related to SmoothSync:
Running AutomationTool...
Parsing command line: -ScriptsForProject="C:/Users/Patrick/Documents/Unreal Projects/MyProject/MyProject.uproject" BuildCookRun -project="C:/Users/Patrick/Documents/Unreal Projects/MyProject/MyProject.uproject" -noP4 -clientconfig=Development -serverconfig=Development -nocompile -nocompileeditor -installed -ue4exe=UE4Editor-Cmd.exe -utf8output -platform=Android_ASTC -targetplatform=Android -cookflavor=ASTC -build -cook -map= -unversionedcookedcontent -compressed -stage -deploy -cmdline=" -Messaging" -device=Android_ASTC@041604ad57cf0202 -addcmdline="-SessionId=1AD3B30A4D7996C0A2CD0FB0D1694D2D -SessionOwner='Patrick' -SessionName='SM_G920F (041604ad57cf0202)' " -run
Setting up ProjectParams for C:\Users\Patrick\Documents\Unreal Projects\MyProject\MyProject.uproject
********** BUILD COMMAND STARTED **********
Running: C:\Program Files\Epic Games\UE_4.21\Engine\Binaries\DotNET\UnrealBuildTool.exe MyProject Android Development -Project="C:\Users\Patrick\Documents\Unreal Projects\MyProject\MyProject.uproject" "C:\Users\Patrick\Documents\Unreal Projects\MyProject\MyProject.uproject" -NoUBTMakefiles -remoteini="C:\Users\Patrick\Documents\Unreal Projects\MyProject" -skipdeploy -Manifest="C:\Users\Patrick\Documents\Unreal Projects\MyProject\Intermediate\Build\Manifest.xml" -NoHotReload -log="C:\Users\Patrick\AppData\Roaming\Unreal Engine\AutomationTool\Logs\C+Program+Files+Epic+Games+UE_4.21\UBT-MyProject-Android-Development.txt"
PLATFORM_ANDROID_NDK_VERSION = 140200
NDK toolchain: r14b, NDK version: 23, GccVersion: 4.9, ClangVersion: 3.8.275480
Compiling Native code with NDK API 'android-23'
Writing manifest to C:\Users\Patrick\Documents\Unreal Projects\MyProject\Intermediate\Build\Manifest.xml
Building 1 action with 16 processes...
[1/1] MyProject-arm64-es2.so
C:/NVPACK/android-ndk-r14b/toolchains/aarch64-linux-android-4.9/prebuilt/windows-x86_64/lib/gcc/aarch64-linux-android/4.9.x/../../../../aarch64-linux-android/bin\ld: error in C:/Program Files/Epic Games/UE_4.21/Engine/Source/ThirdParty/GooglePlay/gpg-cpp-sdk.v2.3/gpg-cpp-sdk/android/lib/gnustl/arm64-v8a\libgpg.a(.eh_frame); no .eh_frame_hdr table will be created.
C:/NVPACK/android-ndk-r14b/toolchains/aarch64-linux-android-4.9/prebuilt/windows-x86_64/lib/gcc/aarch64-linux-android/4.9.x/../../../../aarch64-linux-android/bin\ld: error in C:/Program Files/Epic Games/UE_4.21/Engine/Source/ThirdParty/GooglePlay/gpg-cpp-sdk.v2.3/gpg-cpp-sdk/android/lib/gnustl/arm64-v8a\libgpg.a(.eh_frame); no .eh_frame_hdr table will be created.
C:/Users/Patrick/Documents/Unreal Projects/MyProject/Intermediate/Build/Android/UE4/Development/MyProject/HoveringVehicle.cppa8.o: In function `USmoothSync::StaticClass()':
C:/Program Files/Epic Games/UE_4.21/Engine/Plugins/Marketplace/SmoothSync/Source/SmoothSyncPlugin/Public/SmoothSync.h:38: undefined reference to `USmoothSync::GetPrivateStaticClass()'
C:/Users/Patrick/Documents/Unreal Projects/MyProject/Intermediate/Build/Android/UE4/Development/MyProject/HoveringVehicle.gen.cppa8.o:(.data.rel.ro+0x588): undefined reference to `Z_Construct_UClass_USmoothSync_NoRegister()'
clang++.exe: error: linker command failed with exit code 1 (use -v to see invocation)
ERROR: UBT ERROR: Failed to produce item: C:\Users\Patrick\Documents\Unreal Projects\MyProject\Binaries\Android\MyProject-arm64-es2.so
(see C:\Users\Patrick\AppData\Roaming\Unreal Engine\AutomationTool\Logs\C+Program+Files+Epic+Games+UE_4.21\UBT-MyProject-Android-Development.txt for full exception trace)
Total build time: 17,68 seconds (Parallel executor: 0,00 seconds)
Took 17,9194746s to run UnrealBuildTool.exe, ExitCode=5
ERROR: UnrealBuildTool failed. See log for more details. (C:\Users\Patrick\AppData\Roaming\Unreal Engine\AutomationTool\Logs\C+Program+Files+Epic+Games+UE_4.21\UBT-MyProject-Android-Development.txt)
(see C:\Users\Patrick\AppData\Roaming\Unreal Engine\AutomationTool\Logs\C+Program+Files+Epic+Games+UE_4.21\Log.txt for full exception trace)
AutomationTool exiting with ExitCode=5 (5)
BUILD FAILED
entry in the header:
UPROPERTY(VisibleDefaultsOnly, BlueprintReadWrite)
class USmoothSync* SmoothSync;
and in the cpp file:
// Add SmoothSync and set Networking defaults
SmoothSync = CreateDefaultSubobject<USmoothSync>(TEXT("SmoothSync"));
bReplicates = true;
bReplicateMovement = false;
and I added it in the build.cs
using UnrealBuildTool;
public class MyProject : ModuleRules
{
public MyProject(ReadOnlyTargetRules Target) : base(Target)
{
PCHUsage = PCHUsageMode.UseExplicitOrSharedPCHs;
PublicDependencyModuleNames.AddRange(new string] { "Core", "CoreUObject", "Engine", "InputCore", "SmoothSyncPlugin" });
PrivateDependencyModuleNames.AddRange(new string] { });
// Uncomment if you are using Slate UI
// PrivateDependencyModuleNames.AddRange(new string] { "Slate", "SlateCore" });
// Uncomment if you are using online features
// PrivateDependencyModuleNames.Add("OnlineSubsystem");
// To include OnlineSubsystemSteam, add it to the plugins section in your uproject file with the Enabled attribute set to true
}
}
Edit:
I copied the SmoothSync folder from the engine’s plugin folder (…/Plugins/Marketplace/) into the projects plugin folder, and now it compiles fine. (Development and Shipping)
But the mixed (c++ & bp) prototyping project did package without the need to do that. I wonder why it worked there and not in the pure c++ project, do you have any clue?