Trying to add shading model makes code unable to compile

Jeyna
Wed, 07 Mar 2018 19:14:11 +0000
C++

Hello,

this is my first time ever asking something on here, so I hope this will be alright. I tried searching for similar topics but couldn’t find anything that seemed to be related to the problem I am experiencing right now.

I have been trying to find a way to do some anime like cel-shading for a while now. Most of what I found so far was simply done via blueprints, but all of that didn’t quite look right. Now, I found another article recently of someone creating something that looks great in screenshots at least, so I wanted to give it a go.

The first step in the process is adding a custom shader model in EngineTypes.h, so I went ahead and added everything there and in a few other files. Problem is that once I was done with it and saved, it could no longer be compiled in the engine. The only thing I could do in the end was reinstall it.
Once I had done that I played around with it, and it appears that even adding a single blank line to any file I edited before suddenly breaks everything with the following error output:

Compiling game modules for hot reload
Performing 9 actions (4 in parallel)
SharedPCH.Engine.cpp
E:\Development\UE4\UE_4.18\Engine\Source\Runtime\Engine\Classes\Engine/EngineTypes.h(849) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
E:\Development\UE4\UE_4.18\Engine\Source\Runtime\Engine\Classes\Engine/EngineTypes.h(880) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
E:\Development\UE4\UE_4.18\Engine\Source\Runtime\Engine\Classes\Engine/EngineTypes.h(1158) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
E:\Development\UE4\UE_4.18\Engine\Source\Runtime\Engine\Classes\Engine/EngineTypes.h(1200) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
E:\Development\UE4\UE_4.18\Engine\Source\Runtime\Engine\Classes\Engine/EngineTypes.h(1248) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
E:\Development\UE4\UE_4.18\Engine\Source\Runtime\Engine\Classes\Engine/EngineTypes.h(1298) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
E:\Development\UE4\UE_4.18\Engine\Source\Runtime\Engine\Classes\Engine/EngineTypes.h(1326) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
E:\Development\UE4\UE_4.18\Engine\Source\Runtime\Engine\Classes\Engine/EngineTypes.h(1347) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
E:\Development\UE4\UE_4.18\Engine\Source\Runtime\Engine\Classes\Engine/EngineTypes.h(1470) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
E:\Development\UE4\UE_4.18\Engine\Source\Runtime\Engine\Classes\Engine/EngineTypes.h(1490) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
E:\Development\UE4\UE_4.18\Engine\Source\Runtime\Engine\Classes\Engine/EngineTypes.h(1527) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
E:\Development\UE4\UE_4.18\Engine\Source\Runtime\Engine\Classes\Engine/EngineTypes.h(1556) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
E:\Development\UE4\UE_4.18\Engine\Source\Runtime\Engine\Classes\Engine/EngineTypes.h(1564) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
E:\Development\UE4\UE_4.18\Engine\Source\Runtime\Engine\Classes\Engine/EngineTypes.h(1581) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
E:\Development\UE4\UE_4.18\Engine\Source\Runtime\Engine\Classes\Engine/EngineTypes.h(1666) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
E:\Development\UE4\UE_4.18\Engine\Source\Runtime\Engine\Classes\Engine/EngineTypes.h(1763) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
E:\Development\UE4\UE_4.18\Engine\Source\Runtime\Engine\Classes\Engine/EngineTypes.h(1818) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
E:\Development\UE4\UE_4.18\Engine\Source\Runtime\Engine\Classes\Engine/EngineTypes.h(1855) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
E:\Development\UE4\UE_4.18\Engine\Source\Runtime\Engine\Classes\Engine/EngineTypes.h(2120) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
E:\Development\UE4\UE_4.18\Engine\Source\Runtime\Engine\Classes\Engine/EngineTypes.h(2158) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
E:\Development\UE4\UE_4.18\Engine\Source\Runtime\Engine\Classes\Engine/EngineTypes.h(2179) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
E:\Development\UE4\UE_4.18\Engine\Source\Runtime\Engine\Classes\Engine/EngineTypes.h(2195) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
E:\Development\UE4\UE_4.18\Engine\Source\Runtime\Engine\Classes\Engine/EngineTypes.h(2232) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
E:\Development\UE4\UE_4.18\Engine\Source\Runtime\Engine\Classes\Engine/EngineTypes.h(2415) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
E:\Development\UE4\UE_4.18\Engine\Source\Runtime\Engine\Classes\Engine/EngineTypes.h(2452) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
E:\Development\UE4\UE_4.18\Engine\Source\Runtime\Engine\Classes\Engine/EngineTypes.h(2580) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
E:\Development\UE4\UE_4.18\Engine\Source\Runtime\Engine\Classes\Engine/EngineTypes.h(2615) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
E:\Development\UE4\UE_4.18\Engine\Source\Runtime\Engine\Classes\Engine/EngineTypes.h(2647) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
E:\Development\UE4\UE_4.18\Engine\Source\Runtime\Engine\Classes\Engine/EngineTypes.h(2690) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
E:\Development\UE4\UE_4.18\Engine\Source\Runtime\Engine\Classes\Engine/EngineTypes.h(2796) : error C2143: syntax error: missing ';' before '<class-head>'
E:\Development\UE4\UE_4.18\Engine\Source\Runtime\Engine\Classes\Engine/EngineTypes.h(2796) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
E:\Development\UE4\UE_4.18\Engine\Source\Runtime\Engine\Classes\Engine/EngineTypes.h(2796) : error C3861: 'FTimerDynamicDelegate_DelegateWrapper': identifier not found
E:\Development\UE4\UE_4.18\Engine\Source\Runtime\Engine\Classes\Engine/EngineTypes.h(2802) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
E:\Development\UE4\UE_4.18\Engine\Source\Runtime\Engine\Classes\Engine/EngineTypes.h(2871) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
E:\Development\UE4\UE_4.18\Engine\Source\Runtime\Engine\Classes\Engine/EngineTypes.h(3058) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
E:\Development\UE4\UE_4.18\Engine\Source\Runtime\Engine\Classes\Engine/EngineTypes.h(3128) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
E:\Development\UE4\UE_4.18\Engine\Source\Runtime\Engine\Classes\Engine/EngineTypes.h(3286) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
E:\Development\UE4\UE_4.18\Engine\Source\Runtime\Engine\Classes\Engine/EngineTypes.h(3301) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
E:\Development\UE4\UE_4.18\Engine\Source\Runtime\Engine\Classes\Engine/EngineTypes.h(3424) : error C2143: syntax error: missing ';' before '<class-head>'
E:\Development\UE4\UE_4.18\Engine\Source\Runtime\Engine\Classes\Engine/EngineTypes.h(3424) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
E:\Development\UE4\UE_4.18\Engine\Source\Runtime\Engine\Classes\Engine/EngineTypes.h(3426) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
E:\Development\UE4\UE_4.18\Engine\Source\Runtime\Engine\Classes\Engine/EngineTypes.h(3484) : error C2143: syntax error: missing ';' before '<class-head>'
E:\Development\UE4\UE_4.18\Engine\Source\Runtime\Engine\Classes\Engine/EngineTypes.h(3484) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
E:\Development\UE4\UE_4.18\Engine\Source\Runtime\Engine\Classes\Engine/EngineTypes.h(3484) : error C3861: 'FConstraintBrokenSignature_DelegateWrapper': identifier not found
E:\Development\UE4\UE_4.18\Engine\Source\Runtime\Engine\Classes\Engine/EngineTypes.h(3518) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
E:\Development\UE4\UE_4.18\Engine\Source\Runtime\Engine\Classes\Engine/EngineTypes.h(3534) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
E:\Development\UE4\UE_4.18\Engine\Source\Runtime\Engine\Classes\Engine/EngineTypes.h(3550) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
E:\Development\UE4\UE_4.18\Engine\Source\Runtime\Engine\Classes\Engine/EngineTypes.h(3567) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
E:\Development\UE4\UE_4.18\Engine\Source\Runtime\Engine\Classes\Engine/EngineTypes.h(3594) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
E:\Development\UE4\UE_4.18\Engine\Source\Runtime\Engine\Classes\Engine/EngineTypes.h(3697) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
E:\Development\UE4\UE_4.18\Engine\Source\Runtime\Engine\Classes\Engine/EngineTypes.h(3755) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
E:\Development\UE4\UE_4.18\Engine\Source\Runtime\Engine\Classes\Engine/EngineTypes.h(3779) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
E:\Development\UE4\UE_4.18\Engine\Source\Runtime\Engine\Classes\Engine/EngineTypes.h(3863) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
ERROR: UBT ERROR: Failed to produce item: E:\Development\UE4\Projects\Project1\Binaries\Win64\UE4Editor-Project1-8571.dll
Total build time: 14.34 seconds (Local executor: 0.00 seconds)

I am pretty much a beginner at everything right now, but I don’t think this is a situation where I am doing something wrong because I don’t know any better … I’m only adding a single line break at the very top of the file after all. I don’t understand how that can break anything, unless perhaps VS Community 2017 does some auto re-formatting or something. But as far as I could see nothing was changed really.

That’s why I am at a loss and thought asking here might be the best course of action.

– edit –

I actually also tried adding the empty line with other editors like Notepad++ as well, with the same result. So I guess auto-formatting as a reason behind it is out of the question after all.

3 posts - 3 participants