Compiler skips files after 67 files

I’ve been working on a project for some months now, using mainly C++, and everything was working fine until it wasn’t. I don’t exactly remember what the initial bug was, but I encountered it previously and the solution was to delete de Binaries folder, recreate the VS project files and rebuild. I rebuilt using VS 2022 and it started raising LNK2005 errors about classes that were previously working. So I investigated, removed the files I was currently working on, regenerate VS project files, rebuild, but to no success. Then, I realise that in the list of compiled files in the VS console, the compiler only “sees” a fraction of the files to compile (16 out of the 80 something total C++ files). To be clear, the build raises no error and is marked as successful, eventhough some files are missing. So, at this point I was very confused so I removed all the files relating to the functionality I was working on, and the project built again, now seeing 59 files to compile. I started adding back the files I removed one by one to see if the problem came from a specific file, and to my surprise the problem came back after having added 10 files. But I couldn’t find anything suspicious about the last file I added, so I removed it added another one. Same result. Did that four times with different files, same results. Then, I removed 4 files that were there when the build worked, and added the four files that “made it” not work (for a total of 67 files in the hierarchy) and the build worked, showed 67 files compile. I tried with multiple other files, with the same result, and once I rebuild after having added more than 67 files, the compiler only sees 16-20 of the files.

From that, I can only conclude that the builder stops working correctly once it needs to build more than 67 files? Does anyone know why this happens, if it’s normal or if there is a way to fix this. From what i can understand, I could build 67 files from scratch, add the rest and build again (instead of rebuilding), but needing to do that everytime something breaks and I need to delete de Binaries seems like a huge hassle and waste of time.

I join the output log of the build with 67 files to compile and with 69 files so you might find something I miss.

Thanks in advance!

67files.txt (5.5 KB)
69files.txt (3.6 KB)

1 Like