# Unresolved External Symbol | Struct & Linker Error

**URL:** <https://forums.unrealengine.com/t/unresolved-external-symbol-struct-linker-error/442900>\
**Category:** Programming & Scripting\
**Tags:** unreal-engine\
**Created:** [February 7, 2019, 11:48am UTC](https://forums.unrealengine.com/t/unresolved-external-symbol-struct-linker-error/442900 "2019-02-07T11:48:08Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![ThatsShocking](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@ThatsShocking](https://forums.unrealengine.com/u/ThatsShocking)\
**Post date:** [February 7, 2019, 11:48am UTC](https://forums.unrealengine.com/t/unresolved-external-symbol-struct-linker-error/442900/1 "2019-02-07T11:48:08Z")

</div>

I’m stumped on this one. Any help is appreciated.  
Let me know if there is any required information for solving this that I haven’t already presented. Thanks in advance.

 ![268086-console-error-log.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/6/e/4/6e46cf879c5b1f2d84c682c16842345a1d835ed6.png)

 ![268102-status-effect-header.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/f/0/f/f0f2cd083cee14faebb99743546a1acac7bafb6f.png)

 ![268103-status-effect-cpp.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/4/1/a/41aa2b14586ab8deb8508ba40c6e80abf98bea4a.png)

![268104-harvest-data-cpp.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/f/7/b/f7b3bda856b6c115259132b6b4f343ea38480dae.png)

 ![268105-harvest-data-header.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/f/f/6/ff6a52666cf4f97883d1a4516032c5f03ff3fdc1.png)

---

<div class="post-metadata">

**Author:** ![SenseiHaketon](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@SenseiHaketon](https://forums.unrealengine.com/u/SenseiHaketon)\
**Post date:** [February 7, 2019, 12:25pm UTC](https://forums.unrealengine.com/t/unresolved-external-symbol-struct-linker-error/442900/2 "2019-02-07T12:25:07Z")

</div>

I think this means, that you have a function in your header file that doesn’t exist in your cpp.

---

<div class="post-metadata">

**Author:** ![ThatsShocking](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@ThatsShocking](https://forums.unrealengine.com/u/ThatsShocking)\
**Post date:** [February 7, 2019, 12:26pm UTC](https://forums.unrealengine.com/t/unresolved-external-symbol-struct-linker-error/442900/3 "2019-02-07T12:26:28Z")

</div>

I thought that too, but I can’t find one and Visual Studios Intelisense isn’t giving me any syntax errors, which it always has done before if that were the case. Thanks though.

---

<div class="post-metadata">

**Author:** ![SenseiHaketon](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@SenseiHaketon](https://forums.unrealengine.com/u/SenseiHaketon)\
**Post date:** [February 7, 2019, 12:32pm UTC](https://forums.unrealengine.com/t/unresolved-external-symbol-struct-linker-error/442900/4 "2019-02-07T12:32:09Z")

</div>

It says it is FStatusEffect::FStatusEffect(), which looks like the constructor of FStatusEffect. If you can’t figure it out, show me a screenshot of this class, both the .h and .cpp

---

<div class="post-metadata">

**Author:** ![ThatsShocking](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@ThatsShocking](https://forums.unrealengine.com/u/ThatsShocking)\
**Post date:** [February 7, 2019, 12:47pm UTC](https://forums.unrealengine.com/t/unresolved-external-symbol-struct-linker-error/442900/5 "2019-02-07T12:47:02Z")

</div>

![267812-cpp.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/7/e/b/7eb6e6ff815d5dec7f379b4768488853bbb88626.png)

---

<div class="post-metadata">

**Author:** ![SenseiHaketon](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@SenseiHaketon](https://forums.unrealengine.com/u/SenseiHaketon)\
**Post date:** [February 7, 2019, 12:57pm UTC](https://forums.unrealengine.com/t/unresolved-external-symbol-struct-linker-error/442900/6 "2019-02-07T12:57:46Z")

</div>

I think you have to define the constructor of a struct in the header file.  
Just type: FStatusEffect() { //functionality in here }

---

<div class="post-metadata">

**Author:** ![SenseiHaketon](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@SenseiHaketon](https://forums.unrealengine.com/u/SenseiHaketon)\
**Post date:** [February 7, 2019, 12:58pm UTC](https://forums.unrealengine.com/t/unresolved-external-symbol-struct-linker-error/442900/7 "2019-02-07T12:58:31Z")

</div>

Also, try to remove the default values for the arguments and see if that works

---

<div class="post-metadata">

**Author:** ![ThatsShocking](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@ThatsShocking](https://forums.unrealengine.com/u/ThatsShocking)\
**Post date:** [February 7, 2019, 1:19pm UTC](https://forums.unrealengine.com/t/unresolved-external-symbol-struct-linker-error/442900/8 "2019-02-07T13:19:55Z")

</div>

Unfortunately, it didn’t work. Thanks again though.

---

<div class="post-metadata">

**Author:** ![SenseiHaketon](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@SenseiHaketon](https://forums.unrealengine.com/u/SenseiHaketon)\
**Post date:** [February 7, 2019, 1:34pm UTC](https://forums.unrealengine.com/t/unresolved-external-symbol-struct-linker-error/442900/9 "2019-02-07T13:34:03Z")

</div>

And also remove the constructors from the cpp

---

<div class="post-metadata">

**Author:** ![ThatsShocking](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@ThatsShocking](https://forums.unrealengine.com/u/ThatsShocking)\
**Post date:** [February 7, 2019, 1:35pm UTC](https://forums.unrealengine.com/t/unresolved-external-symbol-struct-linker-error/442900/10 "2019-02-07T13:35:25Z")

</div>

I did but I didn’t work either.

---

<div class="post-metadata">

**Author:** ![SenseiHaketon](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@SenseiHaketon](https://forums.unrealengine.com/u/SenseiHaketon)\
**Post date:** [February 7, 2019, 1:40pm UTC](https://forums.unrealengine.com/t/unresolved-external-symbol-struct-linker-error/442900/11 "2019-02-07T13:40:58Z")

</div>

Did you do that for all the functions and structs that were giving you the error? If so, do you still get the same errors?

---

<div class="post-metadata">

**Author:** ![ThatsShocking](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@ThatsShocking](https://forums.unrealengine.com/u/ThatsShocking)\
**Post date:** [February 7, 2019, 2:47pm UTC](https://forums.unrealengine.com/t/unresolved-external-symbol-struct-linker-error/442900/12 "2019-02-07T14:47:53Z")

</div>

Yes, that’s correct.

---

<div class="post-metadata">

**Author:** ![ThatsShocking](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@ThatsShocking](https://forums.unrealengine.com/u/ThatsShocking)\
**Post date:** [February 10, 2019, 11:28am UTC](https://forums.unrealengine.com/t/unresolved-external-symbol-struct-linker-error/442900/13 "2019-02-10T11:28:22Z")

</div>

I did forward declare my structures in a separate file and then included them in the files I used them. I also don’t get any red squiggly line in visual studios. Thanks though.

---

<div class="post-metadata">

**Author:** ![SenseiHaketon](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@SenseiHaketon](https://forums.unrealengine.com/u/SenseiHaketon)\
**Post date:** [February 11, 2019, 12:45pm UTC](https://forums.unrealengine.com/t/unresolved-external-symbol-struct-linker-error/442900/14 "2019-02-11T12:45:28Z")

</div>

Alright, can you upload your project somewhere so I can look into it?

---

<div class="post-metadata">

**Author:** ![ThatsShocking](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@ThatsShocking](https://forums.unrealengine.com/u/ThatsShocking)\
**Post date:** [February 13, 2019, 10:44pm UTC](https://forums.unrealengine.com/t/unresolved-external-symbol-struct-linker-error/442900/15 "2019-02-13T22:44:46Z")

</div>

I ran into some complications when trying to upload it to GitHub so I opted to upload it to Google Drive; I hope this isn’t a problem and that the files were uploaded correctly. Anyways, here is the sharable link: [https://drive.google.com/drive/folders/1nMjX8DYFo-3eP34SBz4lp\_blWt5umABF?usp=sharing](https://drive.google.com/drive/folders/1nMjX8DYFo-3eP34SBz4lp_blWt5umABF?usp=sharing)

---

<div class="post-metadata">

**Author:** ![Almost-Famous](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Almost-Famous](https://forums.unrealengine.com/u/Almost-Famous)\
**Post date:** [February 13, 2019, 11:20pm UTC](https://forums.unrealengine.com/t/unresolved-external-symbol-struct-linker-error/442900/16 "2019-02-13T23:20:26Z")

</div>

You forgot to define the constructor for FStatusEffect in the source file. You declare it but never define it.

If you fix that up, everything else seems fine from what I can see at a glance.

---

<div class="post-metadata">

**Author:** ![ThatsShocking](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@ThatsShocking](https://forums.unrealengine.com/u/ThatsShocking)\
**Post date:** [February 14, 2019, 12:21am UTC](https://forums.unrealengine.com/t/unresolved-external-symbol-struct-linker-error/442900/17 "2019-02-14T00:21:26Z")

</div>

I’m confused, didn’t I? Were you perhaps talking about a different structure of mine?

 ![268540-header.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/8/f/2/8f2b728dd9d564986c3ea8bc3d235cdf6fc27b3d.png)

 ![268551-source.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/9/8/a/98a0527f9a6bd455bca15f669724818c0d38640b.png)

---

<div class="post-metadata">

**Author:** ![Almost-Famous](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Almost-Famous](https://forums.unrealengine.com/u/Almost-Famous)\
**Post date:** [February 14, 2019, 12:34am UTC](https://forums.unrealengine.com/t/unresolved-external-symbol-struct-linker-error/442900/18 "2019-02-14T00:34:57Z")

</div>

Weird. The source file was missing on your project you posted. I’ll take another look if that’s not the case in your master project.

![268552-files.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/e/0/9/e09d6a460bb4985738c66c24c733b80edbd01bf1.png)

---

<div class="post-metadata">

**Author:** ![SenseiHaketon](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@SenseiHaketon](https://forums.unrealengine.com/u/SenseiHaketon)\
**Post date:** [February 14, 2019, 12:38am UTC](https://forums.unrealengine.com/t/unresolved-external-symbol-struct-linker-error/442900/19 "2019-02-14T00:38:36Z")

</div>

No problem, i’m gonna take a look tomorrow.

---

<div class="post-metadata">

**Author:** ![ThatsShocking](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@ThatsShocking](https://forums.unrealengine.com/u/ThatsShocking)\
**Post date:** [February 14, 2019, 12:48am UTC](https://forums.unrealengine.com/t/unresolved-external-symbol-struct-linker-error/442900/20 "2019-02-14T00:48:15Z")

</div>

Apologies, I couldn’t find an alternative to google drive for uploading the project files (I tried github but ran into complications). It’s likely that StatusEffect.cpp wasn’t uploaded since a lot of other files were rejected (mainly .obj files).

[Next page](https://forums.unrealengine.com/t/unresolved-external-symbol-struct-linker-error/442900.md?page=2)
