Can't compile after add empty .cpp file
I have a C++ project that I use to test some libraries before adding them to my main project. I currently work with a noise library, that works pretty well in a small project. But I have a problem when I add more than 31 .cpp files in my project : the compiler does not compile correctly the library and shows incoherent errors.
To target the problem, I have created 2 projects, one with the library + 23 empty .cpp files, and another with the library + 24 empty .cpp files (I use empty .cpp files just to demonstrate the problem). The first project compiles normally, they are lots of warning but i can use the lib normally. But the second can not compile at all. If you remove one of the empty .cpp files that I put into the project, it will compile.
This is my 2 projects :
They are very light projects so you can test yourself by downloading them and generate VS project files (by right-clicking on the .uproject) and try to compile them in VS. I tested them on two different computers, with different installations, with UE 4.21 and 4.19, and the problem is the same.
So what am I missing? It seems that the compiler compiles differently when a project contains more than 31 .cpp files.
The answer was to disable the unity build.
answered Apr 18 '19 at 10:23 AM
Follow this question
Once you sign in you will be able to subscribe for any updates here