x

Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

Unresolved external symbol FSocketReference::InitialzeCompactBoneIndex

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

Product Version: UE 4.18
Tags:
more ▼

asked Nov 23 '17 at 11:46 AM in C++ Programming

avatar image

AlekseyIlin
304 16 19 29

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

1 answer: sort voted first

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

more ▼

answered Nov 28 '17 at 02:32 PM

avatar image

MichaelBibby
41 2 5 8

avatar image AlekseyIlin Nov 29 '17 at 09:08 AM

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.

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question