I've been having a weird problem with VC++ lately and was just wondering if anyone else had seen this and more importantly knew how to resolve it!
I have quite a large solution, with multiple projects (if that matters). I also have multithread building enabled. What has been happening lately is if, for example, I make a change to a single source file and then build the project, the compiler will be
launched twice for the same file. This then causes an error because (unsurprisingly) the second instance of the compiler isn't able to write to the .sbr file while the first instance is, which causes the build to fall over.
Here's an example of what I see:
1>------ Build started: Project: testproject, Configuration: Debug x64 ------ 1>Compiling... 1>testfile.cpp 1>testfile.cpp 1>.\testfile.cpp(1) : fatal error C1083: Cannot open compiler generated file: 'x64\Debug\testfile.sbr': Permission denied 1>Creating browse information file... 1>Microsoft Browse Information Maintenance Utility Version 9.00.21022 1>Copyright (C) Microsoft Corporation. All rights reserved. 1>Build Time 0:05 1>Build log was saved at "file://c:\Users\Jon\Documents\Visual Studio Projects\testproject\trunk\testproject\testproject\x64\Debug\BuildLog.htm" 1>testproject - 1 error(s), 0 warning(s) ========== Build: 0 succeeded, 1 failed, 48 up-to-date, 0 skipped ==========
I've checked the obvious (that the source file isn't included in the project twice somehow) and it's definitely not. This seems to happen with all files in the project, not just one, and also doesn't seem to happen ALL the time (although it is very frequent).