# Unresolved external symbol FSocketReference::InitialzeCompactBoneIndex

**URL:** <https://forums.unrealengine.com/t/unresolved-external-symbol-fsocketreference-initialzecompactboneindex/410395>\
**Category:** Plugins\
**Tags:** dependencies, socket-reference, unresolved-external-, unreal-engine, Plugins, question\
**Created:** [November 23, 2017, 11:46am UTC](https://forums.unrealengine.com/t/unresolved-external-symbol-fsocketreference-initialzecompactboneindex/410395 "2017-11-23T11:46:12Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![AlekseyIlin](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@AlekseyIlin](https://forums.unrealengine.com/u/AlekseyIlin)\
**Post date:** [November 23, 2017, 11:46am UTC](https://forums.unrealengine.com/t/unresolved-external-symbol-fsocketreference-initialzecompactboneindex/410395/1 "2017-11-23T11:46:12Z")

</div>

For some reason this code

```
const FBoneContainer RequiredBones;
FSocketReference ref;
ref.InitialzeCompactBoneIndex(RequiredBones);

```

compiles with the error

```
error LNK2019: unresolved external symbol "public: void __cdecl FSocketReference::InitialzeCompactBoneIndex(struct FBoneContainer const &)" (?InitialzeCompactBoneIndex@FSocketReference@@QEAAXAEBUFBoneContainer@@@Z) referenced in function "protected: virtual void__cdecl AFabrikFullBody::BeginPlay(void)" (?BeginPlay@AFabrikFullBody@@MEAAXXZ)
2>C:\Users\gamer\Documents\Unreal Projects\Fabrik\annapurnapics_rnd\Binaries\Win64\UE4Editor-FabrikConstraints-Win64-DebugGame.dll : fatal error LNK1120: 1 unresolved externals

```

Had this error before, so I modified dependencies in the build.cs file

```
PublicDependencyModuleNames.AddRange(new string[] { "Core", "CoreUObject", "Engine", "InputCore", "AnimGraphRuntime" });

PrivateDependencyModuleNames.AddRange(new string[] { "AnimGraphRuntime" });

```

and added `#include "BoneControllers/AnimNode_SkeletalControlBase.h"` in the .cpp file with the code. Don’t know why it doesn’t work, looks ok to me

---

<div class="post-metadata">

**Author:** ![LucidMikeB](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@LucidMikeB](https://forums.unrealengine.com/u/LucidMikeB)\
**Post date:** [November 28, 2017, 2:32pm UTC](https://forums.unrealengine.com/t/unresolved-external-symbol-fsocketreference-initialzecompactboneindex/410395/2 "2017-11-28T14:32:27Z")

</div>

Hi.

Funnily enough, I’ve had practically the same issue only today.

The problem seems to be that FSocketReference isn’t exposed within its dll and therefore cannot be accessed externally. To fix this I simply added the export macro (ANIMGRAPHRUNTIME\_API) to the struct in the Engine source in AnimNode\_SkeletalControlBase.h like this:

```
USTRUCT()
struct ANIMGRAPHRUNTIME_API FSocketReference
{
   ...

```

And by doing that my code could access the struct from within the AnimGraphRuntime dll. It does unfortunately require a change to the engine source code, but as it seems you’re running from source anyway, that might not be an issue for you.

Hope it helps.

Mike

---

<div class="post-metadata">

**Author:** ![AlekseyIlin](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@AlekseyIlin](https://forums.unrealengine.com/u/AlekseyIlin)\
**Post date:** [November 29, 2017, 9:08am UTC](https://forums.unrealengine.com/t/unresolved-external-symbol-fsocketreference-initialzecompactboneindex/410395/3 "2017-11-29T09:08:39Z")

</div>

Thanks, figured as much. Sadly I am not building the engine from the source code.

I am using simple yet ugly workaround: add `FSocketReference` method implementations from its .cpp file to .cpp files where they are used. Same with any other similar issue - just copy stuff and hope it won’t break in future versions.
