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 | Struct & Linker Error

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. alt text

alt text

alt text

alt text

alt text

Product Version: UE 4.20
Tags:
more ▼

asked Feb 07 '19 at 11:48 AM in C++ Programming

avatar image

ThatsShocking
19 3 3 7

(comments are locked)
10|2000 characters needed characters left

3 answers: sort voted first

I fixed 2 of the 3 remaining errors and I'm fairly sure I can fix the final errors. One error was because the constructor for one of my structures was in a source file (.cpp) that was created in the intermediate folder rather than the source folder. This is because by default Visual Studios creates files there for Unreal Project, I knew this and thought I had a handle on it but at some point, I slipped up and accidentally created a file without changing the file creation location. The other error was because I declared a constructor in a struct that didn't need one, so I never defined it and that caused an error which I fixed by removing the declaration. The last error was caused by me creating a variable of type UUserWidget (it was also a pointer), I think this might be caused by the need of a line of code in the build.cs file for you to be able to utilize UUserWidger, but I am not sure in the slightest. Unfortunately, after removing the line of code declaring the UUserWidget variable and as well as removing he include for it, the engine crashed during a hot reload. Now I can't get it to open, and this is what I'm currently trying to debug.

more ▼

answered Feb 14 '19 at 01:08 AM

avatar image

ThatsShocking
19 3 3 7

(comments are locked)
10|2000 characters needed characters left

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

more ▼

answered Feb 07 '19 at 12:25 PM

avatar image

SenseiHaketon
181 4 4 7

avatar image ThatsShocking Feb 07 '19 at 12:26 PM

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.

avatar image SenseiHaketon Feb 07 '19 at 12:32 PM

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

avatar image ThatsShocking Feb 07 '19 at 12:47 PM

alt text

h.png (49.0 kB)
cpp.png (23.2 kB)
avatar image SenseiHaketon Feb 07 '19 at 12:57 PM

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

avatar image SenseiHaketon Feb 07 '19 at 12:58 PM

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

avatar image ThatsShocking Feb 07 '19 at 01:19 PM

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

avatar image SenseiHaketon Feb 07 '19 at 01:34 PM

And also remove the constructors from the cpp

avatar image ThatsShocking Feb 07 '19 at 01:35 PM

I did but I didn't work either.

avatar image SenseiHaketon Feb 07 '19 at 01:40 PM

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?

avatar image ThatsShocking Feb 07 '19 at 02:47 PM

Yes, that's correct.

avatar image SenseiHaketon Feb 11 '19 at 12:45 PM

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

avatar image ThatsShocking 6 days ago

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

avatar image SenseiHaketon 6 days ago

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

(comments are locked)
10|2000 characters needed characters left

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.

more ▼

answered Feb 13 '19 at 11:20 PM

avatar image

Almost-Famous
11 1 2

avatar image ThatsShocking 6 days ago

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

alt text

header.png (9.9 kB)
source.png (17.3 kB)
avatar image Almost-Famous 6 days ago

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. alt text

files.png (7.9 kB)
avatar image ThatsShocking 6 days ago

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).

(comments are locked)
10|2000 characters needed characters left
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