# Linking error on one function. Header is included.

**URL:** <https://forums.unrealengine.com/t/linking-error-on-one-function-header-is-included/881347>\
**Category:** Programming & Scripting\
**Tags:** unreal-engine, question\
**Created:** [April 9, 2023, 6:04pm UTC](https://forums.unrealengine.com/t/linking-error-on-one-function-header-is-included/881347 "2023-04-09T18:04:35Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![fgvand944](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@fgvand944](https://forums.unrealengine.com/u/fgvand944)\
**Post date:** [April 9, 2023, 6:04pm UTC](https://forums.unrealengine.com/t/linking-error-on-one-function-header-is-included/881347/1 "2023-04-09T18:04:35Z")

</div>

When I try to call UAnimMontage::HasValidSlotSetup() with my instance of the UAnimMontage class I get a linking error. Every other function in the UAnimMontage class works for me that I’ve tried and I have the appropriate header included and it’s module is engine so it’s in my build file. I’m also getting this error “The command 'D:/UE\_5.0/Engine/Build/BatchFiles/Build.bat MyProject2Editor Win64 DebudGame -Projects=D:/UE\_5.0/UnrealProjects/MyProject2/MyProject2.uproject -WaitMutex -FromMsBuild exited with code 6” only when I call that function. Thought it was maybe cause I was using visual studio 2022 and not 2019 so I installed 2019 and am now using that. Now I’m getting another error with the 2019 version “Incomplete type is not allowed” in BasicLayoutWidgetSlot.h and SlotBase.h. I read another post [here](https://forums.unrealengine.com/t/ue-log-unable-to-print-an-fname-from-fanimmontageinstance/346329/3) with a similar linking error on just one function and it looked like the issue was that the code in the engine wasn’t prefaced with ENGINE\_API. Looked at the source for the UAnimMontage class and this function doesn’t have that preface so I’m wondering if that’s the issue but I’m not sure. I have no idea on the other two errors. Any help would be appreciated. Thanks!
