# Got symbol already defined error when updating project from UE 5.2 to UE 5.5

**URL:** <https://forums.unrealengine.com/t/got-symbol-already-defined-error-when-updating-project-from-ue-5-2-to-ue-5-5/2248649>\
**Category:** C++\
**Tags:** unreal-engine, question, CPP\
**Created:** [December 29, 2024, 12:08pm UTC](https://forums.unrealengine.com/t/got-symbol-already-defined-error-when-updating-project-from-ue-5-2-to-ue-5-5/2248649 "2024-12-29T12:08:17Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ritanlisa](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Ritanlisa](https://forums.unrealengine.com/u/Ritanlisa)\
**Post date:** [December 29, 2024, 12:08pm UTC](https://forums.unrealengine.com/t/got-symbol-already-defined-error-when-updating-project-from-ue-5-2-to-ue-5-5/2248649/1 "2024-12-29T12:08:17Z")

</div>

## My static Class Member in my plugin got LNK2005 Error : symbol already defined in object when I was trying to update my project to UE 5.5, and it can work correctly in UE 5.2

source codes are below:

These code comes from the plugin:

SoulConnect.h

```cpp
// All Right Reserved

#pragma once

#include "CoreMinimal.h"
#include "Engine/DataAsset.h"
#include "SoulPerkTree.h"
#include "SoulConnect.generated.h"

USTRUCT(BlueprintType)
struct FSoulConnection {
    GENERATED_BODY()
public:
    ...
    static double ConnectionWeight;
};

double FSoulConnection::ConnectionWeight = 0.005f;

```

SoulConnect.cpp

```cpp
// All Right Reserved

#include "SoulConnect.h"

FPrimaryAssetId USoulConnect::GetPrimaryAssetId() const
{
    static const FPrimaryAssetType AssetType = TEXT("SoulConnect");
    return FPrimaryAssetId(AssetType, GetFName());
}

```

And PerkTreeActorComponent.h used that header in include, and it(PerkTreeActorComponen) is in my project UE511SV2K

Current Problem is:

> FSoulConnection::ConnectionWeight has already defined

> in Module.UE511SV2K.cpp.obj  
> (Raised by PerkTreeActorComponent.cpp.obj / USoulTreeRenderUMG.cpp.obj)

> and in Module.SoulTreeDisplayer.cpp.obj  
> (Raised by SoulConnect.cpp.obj / SoulTreeDisplayer.cpp.obj / SoulTreeEditor.cpp.obj / SoulTreeRenderWidget.cpp.obj)

I’ve tried some ways to solve this issue:

- Delete the implement of **ConnectionWeight** :  
Got error LNK2001 unresolved external symbol （from SoulTreeRenderWidget.cpp.obj / PerkTreeActorComponent.cpp.obj)
- Move the implement of **ConnectionWeight** into cpp file (cut and paste)  
Got error LNK2001 unresolved external symbol (from PerkTreeActorComponent.cpp.obj)
- Use `double FSoulConnection::ConnectionWeight;` in .h and `FSoulConnection::ConnectionWeight = 0.005f;` in .cpp  
Got C4430 missing type specifier in SoulConnect.cpp where `FSoulConnection::ConnectionWeight = 0.005f;` located  
and C2371 redefinition in SoulConnect.h where `double FSoulConnection::ConnectionWeight;` located.

Why should this happen? Can anybody help?
