The fact that the error is for your own type rather than a core Slate type suggests that the compiler has seen the declaration for your type, but not the corresponding definition.
Is your cpp file definitely in a place it will be compiled, and does it contain a definition for the Construct function?
i posted my files above, i do have them in a different directory, as the class wizard would not put them in the same directory where my other project files were but in some /intermediate/ folder. i cannot really tell if a file gets compiled as i dont know how to check that in visual studio, but i noticed that uncommenting the line:
SAssignNew(MyWidget, SMyWidget)
.OwnerHUD(this);
in SimpleRPGHUD.cpp helps, it compiles then…so it does seem to be connected to the constructor of MyWidget
Okay i solved it by deleting those files in the intermediate folders, and reimplementing it , putting all the widget class files into the source/project folder.
**I guess somehow the linker couldnt take the different directories and messed up the linking process thus.
Thank you very much !!**
that leads me to the next question:is there any way for me to see if the compiler actually sees those files , to circumvent such trouble in the future ?
because apparently i had all the right folders etc in the includes, and still would produce those weird linker errors when invoked in the HUD class.
If instead of posting all the information as separate answers you could post them as comments until you/someone else has found an answer, it would help keep the answers hub more organized and readable for others
i agree on keeping it organized, but i honestly prefer new posts instead comments , as i do not think comments make it more organized! but ill keep it in my mind for future!
alright ! yeah i dont know why the class wizard put them into intermediate, but apparently every time you try to create a class with that wizard inside visual studio, it autoplaces it into intermediate, its greyed out from being changed !
Hmm, it seems that it will put them next to the project, which is in the intermediate directory.
That’s a bit annoying, and I don’t think we have any control over it.
You could use the “Add Code to Project…” option in the editor, but I’m not sure how well suited that is to adding new Slate widget classes (it’s really designed for UObject classes).