Download

Building UE4 C++ Project under source build of identical version fails

My project was of ue4.23 latest binary build. I downloaded and compiled the source build 4.23 latest. The engine compiled and started fine.
Now I wanted to target my project from my binary build to my source build version. So I right clicked in the .uproject file → Switch Unreal Engine version… → selected the source build
I’ve been working with binary build version so far, but I wanted to switch to the source build.
After it’s done generating files, I open the .sln file to build my project again. And now visual studio doesn’t recognize any UE4 symbols and include files. Of course the build fails.
example errors:
Severity Code Description Project File Line Suppression State
Error (active) E0020 identifier “TEXT” is undefined builder J:\NikosL91\documents\Unreal_Projects\builder\Source\builder\Private\CppCharacter.cpp 11
Severity Code Description Project File Line Suppression State
Error (active) E0020 identifier “USpringArmComponent” is undefined builder J:\NikosL91\documents\Unreal_Projects\builder\Source\builder\Private\CppCharacter.cpp 11
Severity Code Description Project File Line Suppression State
Error (active) E0020 identifier “CreateDefaultSubobject” is undefined builder J:\NikosL91\documents\Unreal_Projects\builder\Source\builder\Private\CppCharacter.cpp 11
Severity Code Description Project File Line Suppression State
Error (active) E0130 expected a ‘{’ builder J:\NikosL91\documents\Unreal_Projects\builder\Source\builder\Private\CppCharacter.cpp 10
Severity Code Description Project File Line Suppression State
Error (active) E0065 expected a ‘;’ builder J:\NikosL91\documents\Unreal_Projects\builder\Source\builder\Private\CppCharacter.cpp 11
Severity Code Description Project File Line Suppression State
Error (active) E0169 expected a declaration builder J:\NikosL91\documents\Unreal_Projects\builder\Source\builder\Private\CppCharacter.cpp 11

The errors are there on every single c++ file of my project. Am I missing something here to build this properly? I’ve looked at the docs and I’m puzzled as to what else I need to do to get it working. Some help will be greatly appreciated.

Ok I found the problem, I had to remove any plugin dependencies prior to building. I opened the .uproject file with a text editor and deleted all non-built in plugins from the list. If you have code that is dependent on these plugins though you will have to more things to do, as you can imagine.