Can too many source files break the build system?

Hello!

I’m experiencing some strange errors while compiling (in Visual Studio 2013) C++ code in an Unreal Engine 4.7 project. It seems since I added a new .cpp-file, the compiler can no longer distinguish anonymous namespaces, and thus I’m getting a name conflict. The output looks like this:

ProjectName\Source\ProjectName\Private\TilePalette.cpp(52): error C2011: ‘anonymous-namespace'::_Impl' : 'struct' type redefinition ProjectName\Source\ProjectName\Private\TileMap.cpp(420) : see declaration of 'anonymous-namespace’::_Impl’
ProjectName\Source\ProjectName\Private\TilePalette.cpp(70): fatal error C1903: unable to recover from previous error(s); stopping compilation

I have found another thread (Adding a new CPP file to project causes other classes to be undefined - Programming & Scripting - Epic Developer Community Forums) where the author concluded that the 30th cpp-file in a project could cause some weird problems, and that seems to be my case also. Unfortunately his solution doesn’t seem to help me, and I would like to point out that I have refreshed the VS project through Unreal Editor. All of the source files have been added through the editor, are properly include guarded, and compile just fine as long as they are no more than 29. Could there be some other culprit that I’m missing? Thanks in advance!

  • David