Build failed when there are 30+ .cpp files in project
I've been used UE4 for a few months now, and my project becomes more and more consequently, since today. In total, I have 29 .cpp files in my Source folder, and when i create one more (even empty), the build explodes. I have 100+ link errors in header files (that has no problems before). And when I delete this new .cpp file, the project compiles normally without errors.
My problem is similar to this one : https://answers.unrealengine.com/questions/168056/adding-a-new-cpp-file-to-project-causes-other-clas.html
But I haven't duplicated headers.
The only difference that i found is with a project with 30 and more .cpp files, the build console say :
These lines don't appear when the project contains 29 .cpp files.
I'm a beginner with the C++ programmation, maybe I miss something else ?
Thank you in advance for your help.
The errors are about the FJsonObject and FJsonValue classes in the Json module. I normally not include the header of these classes but when I build with 30+ .cpp files, I'm forced to include them in each file that use the Json module, also in the source code of plugins that I use and I'd rather not touch that part of code that is not mine.
answered Oct 04 '18 at 01:37 PM
My first guess would be that some chache is messed up. Try to do a clean rebuild of your project so all intermediate data gets regenerated.
answered Oct 04 '18 at 02:30 PM
I tried this and I also tried to remove the Saved, Intermediate, Binaries and .vs folders, and regenerate the visual studio project file. I tried to clean the project with visual studio, to rebooet the IDE and my computer, without results.
answered Oct 04 '18 at 02:42 PM
Follow this question
Once you sign in you will be able to subscribe for any updates here