In my project, i have added some additional classes in their own files, but when i try to include them, i get this compilation error
Error c:\users\edwin\documents\unreal projects pexample\source pexample\Enemy.h(7) : fatal error C1083: Cannot open include file: 'UNN.h': No such file or directory
It is in the same directory, and i’ve searched around the issue, but have found no answers!
Are you able to include other classes?
If other classes work try this, create a new class and copy the code from the one that doesn’t work and then include the new one.
Edit: Also name it something else and try with the lowercase letters.
Where are your files located physically? UE4 doesn’t care about your solution - that’s just for your viewing convenience. Show us where those new files of yours are in Windows Explorer.
DW about my classes, i can still find them in my file explorer. It must have just moved them.
Blue Man, i’ll try making the classes within UE4, lets see if that works.
EDIT: YES it at least tries to compile them and the include works. TY.
BUT…
THey have been included, but the classes within the header files aren’t being recognised…
I am getting a HUGE compile error, because it doesn’t recognise my type identifiers:
c:\users\edwin\documents\unreal projects pexample\source pexample\UNN.h(13): error C4430: missing type specifier - int assumed. Note: C++ does not support default-intc:\users\edwin\documents\unreal projects pexample\source pexample\Connector.h(12): error C2143: syntax error: missing ';' before '*'
When you add new .h/.cpp files. It automatically wants to place them in your Intermediates folder (or whatever its called) so if u didnt move them thats where they are and why u cant include them. Doesnt matter where they show in the solution explorer as thats just a visual organiser.
As for your issue with int. Don’t use the builtin integer types. Use int32, uint32, int16, uint16, int8, uint8 instead.
Thanks, the classes weren’t in the source file, so i moved them from intermediate.
I have no issue with int, the problem is that something is stopping it from being able to recognise my type identifiers, so it is assuming them as ints! I don’t know why my classes aren’t being defined tho…
Ah my bad, im on my phone so couldnt read the whole xode block. Once ur .h/.cpp have been moved and u include the .h then the class undefined issue should technically resolve itself.
This makes me want to cry. I have the .cpp and .h files I added in the source folder. I had VS add them to the project. I tried building and got the same “defies common sense” error and then tried saving/closing/opening/rebuilding strategy and the same error occurs.
I am using UE4.22.3 and VS 2017 Express (Community edition is not an option for my company due to license issues)