Unresolved external symbol for UTimelineComponent

I’ve updated VS2017 to the latest 15.3.2

Since then the version 4.17.1 does not compile anymore.

In version 4.15.3 it compiles but my project generates unresolved external symbol for the UTimelineComponent
Something should be wrong in UE source file since the VS2017 update.

2>   Creating library D:\KadeoGames\UDK\KSGM\Intermediate\Build\Win64\UE4Editor\Development\UE4Editor-KSGM.lib and object D:\KadeoGames\UDK\KSGM\Intermediate\Build\Win64\UE4Editor\Development\UE4Editor-KSGM.exp
2>   Creating library D:\KadeoGames\UDK\KSGM\Intermediate\Build\Win64\UE4Editor\Development\UE4Editor-KSGM.suppressed.lib and object D:\KadeoGames\UDK\KSGM\Intermediate\Build\Win64\UE4Editor\Development\UE4Editor-KSGM.suppressed.exp
2>KTimelineObject.cpp.obj : error LNK2001: unresolved external symbol "public: virtual void __cdecl UTimelineComponent::GetLifetimeReplicatedProps(class TArray<class FLifetimeProperty,class FDefaultAllocator> &)const " (?GetLifetimeReplicatedProps@UTimelineComponent@@UEBAXAEAV?$TArray@VFLifetimeProperty@@VFDefaultAllocator@@@@@Z)
2>KSGM.generated.1.cpp.obj : error LNK2001: unresolved external symbol "public: virtual void __cdecl UTimelineComponent::GetLifetimeReplicatedProps(class TArray<class FLifetimeProperty,class FDefaultAllocator> &)const " (?GetLifetimeReplicatedProps@UTimelineComponent@@UEBAXAEAV?$TArray@VFLifetimeProperty@@VFDefaultAllocator@@@@@Z)
2>KTimelineObject.cpp.obj : error LNK2001: unresolved external symbol "public: virtual void __cdecl UTimelineComponent::TickComponent(float,enum ELevelTick,struct FActorComponentTickFunction *)" (?TickComponent@UTimelineComponent@@UEAAXMW4ELevelTick@@PEAUFActorComponentTickFunction@@@Z)
2>KSGM.generated.1.cpp.obj : error LNK2001: unresolved external symbol "public: virtual void __cdecl UTimelineComponent::TickComponent(float,enum ELevelTick,struct FActorComponentTickFunction *)" (?TickComponent@UTimelineComponent@@UEAAXMW4ELevelTick@@PEAUFActorComponentTickFunction@@@Z)
2>KTimelineObject.cpp.obj : error LNK2001: unresolved external symbol "public: virtual void __cdecl UTimelineComponent::Activate(bool)" (?Activate@UTimelineComponent@@UEAAX_N@Z)
2>KSGM.generated.1.cpp.obj : error LNK2001: unresolved external symbol "public: virtual void __cdecl UTimelineComponent::Activate(bool)" (?Activate@UTimelineComponent@@UEAAX_N@Z)
2>KTimelineObject.cpp.obj : error LNK2001: unresolved external symbol "public: virtual void __cdecl UTimelineComponent::Deactivate(void)" (?Deactivate@UTimelineComponent@@UEAAXXZ)
2>KSGM.generated.1.cpp.obj : error LNK2001: unresolved external symbol "public: virtual void __cdecl UTimelineComponent::Deactivate(void)" (?Deactivate@UTimelineComponent@@UEAAXXZ)
2>KTimelineObject.cpp.obj : error LNK2001: unresolved external symbol "public: virtual bool __cdecl UTimelineComponent::IsReadyForOwnerToAutoDestroy(void)const " (?IsReadyForOwnerToAutoDestroy@UTimelineComponent@@UEBA_NXZ)
2>KSGM.generated.1.cpp.obj : error LNK2001: unresolved external symbol "public: virtual bool __cdecl UTimelineComponent::IsReadyForOwnerToAutoDestroy(void)const " (?IsReadyForOwnerToAutoDestroy@UTimelineComponent@@UEBA_NXZ)
2>D:\KadeoGames\UDK\KSGM\Binaries\Win64\UE4Editor-KSGM.dll : fatal error LNK1120: 5 unresolved externals
2>ERROR : UBT error : Failed to produce item: D:\KadeoGames\UDK\KSGM\Binaries\Win64\UE4Editor-KSGM.dll

The class deriving from UTimelineComponent was working before the update.

/**
 * @brief Interface of the UKTimelineObject class.
 *
 * @info Copyright (c) 2015 Kadeo. All rights reserved. 
 * 
 *         This source code is only intended as a supplement to the Kadeo User's Guide and
 *         related electronic documentation provided with the library. See these sources for
 *         detailed information regarding the Kadeo product.
 *
 * @author dominique.aigroz@kadeo.net
 * @date 16.05.2015
 *
 * @file D:\KadeoGames\UDK\KSGM\Source\KSGM\Helpers\UObjects\KTimelineObject.h
 */

#pragma once
#include "Components/TimelineComponent.h"
#include "KTimelineObject.generated.h"

/**
* UKTimelineObject implements a UTimelineComponent.
* Events can be triggered at keyframes along the timeline.
* Floats, vectors, and colors are interpolated between keyframes along the timeline.
*/
UCLASS()
class KSGM_API UKTimelineObject : public UTimelineComponent
{
	GENERATED_UCLASS_BODY()

public:

	/**
	 * @brief Initializes the timeline with a vector curve and set the tick and finish call-back functions.
	 *
	 * @param VectorCurve		   If non-null, the vector curve.
	 * @param TickFunc			   The function to call on every tick.
	 * @param FinishedFunc		   The finished function.
	 * @param InOwner			   The actor owner.
	 * @param InPlayRate		   (Optional) the play rate. Default is 1.0
	 * @param InLengthMode		   (Optional) the in length mode. Default is ETimelineLengthMode::TL_TimelineLength.
	 * @param InLength			   (Optional) the initial length. Default is 100.							   
	 * @param PropertyName		   (Optional) name of the property. Default is NAME_None.
	 */
	void Initialize(class UCurveVector* VectorCurve, FOnTimelineVector TickFunc, FOnTimelineEvent FinishedFunc, const AActor* InOwner, float InPlayRate = 1.0f, ETimelineLengthMode InLengthMode = ETimelineLengthMode::TL_TimelineLength, const float InLength = 100.0f, FName PropertyName = NAME_None);

	/**
	* @brief Initializes the timeline with a float curve and set the tick and finish call-back functions.
	*
	* @param FloatCurve			   If non-null, the float curve.
	* @param TickFunc			   The function to call on every tick.
	* @param FinishedFunc		   The finished function.
	* @param InOwner			   The actor owner.
	* @param InPlayRate			   (Optional) the play rate. Default is 1.0
	* @param InLengthMode		   (Optional) the in length mode. Default is ETimelineLengthMode::TL_TimelineLength.
	* @param InLength			   (Optional) the initial length. Default is 100.
	* @param PropertyName		   (Optional) name of the property. Default is NAME_None.
	*/
	void Initialize(class UCurveFloat* FloatCurve, FOnTimelineFloat TickFunc, FOnTimelineEvent FinishedFunc, const AActor* InOwner, float InPlayRate = 1.0f, ETimelineLengthMode InLengthMode = ETimelineLengthMode::TL_TimelineLength, const float InLength = 100.0f, FName PropertyName = NAME_None);

	/**
	* @brief Initializes the timeline with a linear color curve and set the tick and finish call-back functions.
	*
	* @param LinearColorCurve	   If non-null, the linear color curve.
	* @param TickFunc			   The function to call on every tick.
	* @param FinishedFunc		   The finished function.
	* @param InOwner			   The actor owner.
	* @param InPlayRate		       (Optional) the play rate. Default is 1.0
	* @param InLengthMode		   (Optional) the in length mode. Default is ETimelineLengthMode::TL_TimelineLength.
	* @param InLength			   (Optional) the initial length. Default is 100.
	* @param PropertyName		   (Optional) name of the property. Default is NAME_None.
	*/
	void Initialize(class UCurveLinearColor* LinearColorCurve, FOnTimelineLinearColor TickFunc, FOnTimelineEvent FinishedFunc, const AActor* InOwner, float InPlayRate = 1.0f, ETimelineLengthMode InLengthMode = ETimelineLengthMode::TL_TimelineLength, const float InLength = 100.0f, FName PropertyName = NAME_None);


	/** Get the initial length of the timeline */
	float GetInitialTimelineLength() const;

	/**
	 * @brief Sets initial timeline length.
	 * @param InLength The new initial time length.
	 */
	void SetInitialTimelineLength(const float InLength);

	/** @brief Sets back the timeline length to initial length. */
	void SetTimelineLengthToInitial();


private:
	/** @brief The initial timeline length. */
	float InitialTimelineLength;
};

/**
// End of D:\KadeoGames\UDK\KSGM\Source\KSGM\Helpers\UObjects\KTimelineObject.h
 */

and cpp

/**
 * @brief Implementation of the UKTimelineObject class.
 *
 * @info Copyright (c) 2015 Kadeo. All rights reserved. 
 * 
 *         This source code is only intended as a supplement to the Kadeo User's Guide and
 *         related electronic documentation provided with the library. See these sources for
 *         detailed information regarding the Kadeo product.
 *
 * @author dominique.aigroz@kadeo.net
 * @date 16.05.2015
 *
 * @file D:\KadeoGames\UDK\KSGM\Source\KSGM\Helpers\UObjects\KTimelineObject.cpp
 */

#include "KSGM.h"
#include "KTimelineObject.h"


UKTimelineObject::UKTimelineObject(const FObjectInitializer& ObjectInitializer)
	: Super(ObjectInitializer)
	, InitialTimelineLength(5.0f)
{
}

void UKTimelineObject::Initialize(UCurveVector* VectorCurve, FOnTimelineVector TickFunc, FOnTimelineEvent FinishedFunc, const AActor* InOwner, float InPlayRate, ETimelineLengthMode InLengthMode, const float InLength, FName PropertyName)
{
	AddInterpVector(VectorCurve, TickFunc, PropertyName);
	SetTimelineFinishedFunc(FinishedFunc);
	SetTimelineLengthMode(InLengthMode);

	SetPlayRate(InPlayRate);
	SetInitialTimelineLength(InLength);
	// Don't forget to register the component for ticking
	RegisterComponent();

}

void UKTimelineObject::Initialize(UCurveFloat* FloatCurve, FOnTimelineFloat TickFunc, FOnTimelineEvent FinishedFunc, const AActor* InOwner, float InPlayRate, ETimelineLengthMode InLengthMode, const float InLength, FName PropertyName)
{
	AddInterpFloat(FloatCurve, TickFunc, PropertyName);
	SetTimelineFinishedFunc(FinishedFunc);
	SetTimelineLengthMode(InLengthMode);

	SetPlayRate(InPlayRate);
	SetInitialTimelineLength(InLength);
	RegisterComponent();
}

void UKTimelineObject::Initialize(UCurveLinearColor* LinearColorCurve, FOnTimelineLinearColor TickFunc, FOnTimelineEvent FinishedFunc, const AActor* InOwner, float InPlayRate, ETimelineLengthMode InLengthMode, const float InLength, FName PropertyName)
{
	AddInterpLinearColor(LinearColorCurve, TickFunc, PropertyName);
	SetTimelineFinishedFunc(FinishedFunc);
	SetTimelineLengthMode(InLengthMode);

	SetPlayRate(InPlayRate);
	SetInitialTimelineLength(InLength);
	RegisterComponent();
}


float UKTimelineObject::GetInitialTimelineLength() const
{
	return InitialTimelineLength;
}

void UKTimelineObject::SetInitialTimelineLength(const float InLength)
{
	InitialTimelineLength = InLength;
	SetTimelineLengthToInitial();
}

void UKTimelineObject::SetTimelineLengthToInitial()
{
	SetTimelineLength(InitialTimelineLength);
}



/**
// End of D:\KadeoGames\UDK\KSGM\Source\KSGM\Helpers\UObjects\KTimelineObject.cpp
 */

I have noticed the same problem with the UE 4.17.1

And in fact it is only for the Editor configuration. Not the Client or the Server configuration.

Why only the Editor configuration ?

Editor configuration:
1>------ Build started: Project: ShaderCompileWorker, Configuration: Development_Program x64 ------
1>Target is up to date
1>Deploying ShaderCompileWorker Win64 Development…
1>Total build time: 0.18 seconds (NoActionsToExecute executor: 0.00 seconds)
2>------ Build started: Project: KSGM, Configuration: Development_Editor x64 ------
2>Performing full C++ include scan (building a new target)
2>Performing 1 actions (12 in parallel)
2>[1/1] Link UE4Editor-KSGM.dll
2> Creating library D:\KadeoGames\UDK\KSGM\Intermediate\Build\Win64\UE4Editor\Development\UE4Editor-KSGM.suppressed.lib and object D:\KadeoGames\UDK\KSGM\Intermediate\Build\Win64\UE4Editor\Development\UE4Editor-KSGM.suppressed.exp
2>Module.KSGM.2_of_5.cpp.obj : error LNK2001: unresolved external symbol "public: virtual void __cdecl UTimelineComponent::GetLifetimeReplicatedProps(class TArray<class FLifetimeProperty,class FDefaultAllocator> &)const " (?GetLifetimeReplicatedProps@UTimelineComponent@@UEBAXAEAV?$TArray@VFLifetimeProperty@@VFDefaultAllocator@@@@@Z)
2>Module.KSGM.gen.5_of_6.cpp.obj : error LNK2001: unresolved external symbol "public: virtual void __cdecl UTimelineComponent::GetLifetimeReplicatedProps(class TArray<class FLifetimeProperty,class FDefaultAllocator> &)const " (?GetLifetimeReplicatedProps@UTimelineComponent@@UEBAXAEAV?$TArray@VFLifetimeProperty@@VFDefaultAllocator@@@@@Z)
2>Module.KSGM.2_of_5.cpp.obj : error LNK2001: unresolved external symbol “public: virtual void __cdecl UTimelineComponent::TickComponent(float,enum ELevelTick,struct FActorComponentTickFunction *)” (?TickComponent@UTimelineComponent@@UEAAXMW4ELevelTick@@PEAUFActorComponentTickFunction@@@Z)
2>Module.KSGM.gen.5_of_6.cpp.obj : error LNK2001: unresolved external symbol “public: virtual void __cdecl UTimelineComponent::TickComponent(float,enum ELevelTick,struct FActorComponentTickFunction *)” (?TickComponent@UTimelineComponent@@UEAAXMW4ELevelTick@@PEAUFActorComponentTickFunction@@@Z)
2>Module.KSGM.2_of_5.cpp.obj : error LNK2001: unresolved external symbol “public: virtual void __cdecl UTimelineComponent::Activate(bool)” (?Activate@UTimelineComponent@@UEAAX_N@Z)
2>Module.KSGM.gen.5_of_6.cpp.obj : error LNK2001: unresolved external symbol “public: virtual void __cdecl UTimelineComponent::Activate(bool)” (?Activate@UTimelineComponent@@UEAAX_N@Z)
2>Module.KSGM.2_of_5.cpp.obj : error LNK2001: unresolved external symbol “public: virtual void __cdecl UTimelineComponent::Deactivate(void)” (?Deactivate@UTimelineComponent@@UEAAXXZ)
2>Module.KSGM.gen.5_of_6.cpp.obj : error LNK2001: unresolved external symbol “public: virtual void __cdecl UTimelineComponent::Deactivate(void)” (?Deactivate@UTimelineComponent@@UEAAXXZ)
2>Module.KSGM.2_of_5.cpp.obj : error LNK2001: unresolved external symbol "public: virtual bool __cdecl UTimelineComponent::IsReadyForOwnerToAutoDestroy(void)const " (?IsReadyForOwnerToAutoDestroy@UTimelineComponent@@UEBA_NXZ)
2>Module.KSGM.gen.5_of_6.cpp.obj : error LNK2001: unresolved external symbol "public: virtual bool __cdecl UTimelineComponent::IsReadyForOwnerToAutoDestroy(void)const " (?IsReadyForOwnerToAutoDestroy@UTimelineComponent@@UEBA_NXZ)
2>D:\KadeoGames\UDK\KSGM\Binaries\Win64\UE4Editor-KSGM.dll : fatal error LNK1120: 5 unresolved externals
2>ERROR : UBT error : Failed to produce item: D:\KadeoGames\UDK\KSGM\Binaries\Win64\UE4Editor-KSGM.dll
2>Total build time: 8.99 seconds (Local executor: 0.00 seconds)
2>C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\VC\VCTargets\Microsoft.MakeFile.Targets(44,5): error MSB3075: The command “D:\GitHub\UnrealEngine\Engine\Build\BatchFiles\Build.bat KSGMEditor Win64 Development “D:\KadeoGames\UDK\KSGM\KSGM.uproject” -waitmutex” exited with code 5. Please verify that you have sufficient rights to run this command.
2>Done building project “KSGM.vcxproj” – FAILED.
========== Build: 1 succeeded, 1 failed, 2 up-to-date, 0 skipped ==========

Client configuration:
1>------ Build started: Project: ShaderCompileWorker, Configuration: Development_Program x64 ------
1>Target is up to date
1>Deploying ShaderCompileWorker Win64 Development…
1>Total build time: 0.15 seconds (NoActionsToExecute executor: 0.00 seconds)
2>------ Build started: Project: KSGM, Configuration: Development_Client x64 ------
2>Performing full C++ include scan (building a new target)
2>Target is up to date
2>Deploying KSGMClient Win64 Development…
2>Prepping KSGMClient for deployment to Win64
2>Total build time: 4.30 seconds (NoActionsToExecute executor: 0.00 seconds)
========== Build: 2 succeeded, 0 failed, 2 up-to-date, 0 skipped ==========

I solved my problem by changing the code source of UTimelineComponent

instead of

UCLASS(MinimalAPI)
class UTimelineComponent : public UActorComponent
{

I’ve marked the entire class to be exported

UCLASS()
class ENGINE_API UTimelineComponent : public UActorComponent
{

And now, no more unresolved external in Editor configuration.

I think this class should be entirely exported rather than only function marked with ENGINE_API.

Could you ask to change this in the code for the next version ?

D.