This is just a guess, but I've had a similar thing happen to me.
Not knowing if this is a best or even a good solution, I solved mine by
creating the project again from scratch and then importing all of the source
files into it. This is becuase I'm pretty sure my project or solution file
got corrupted. The source files however tend to stay in tact.
When I did this my porgram started compiling again. But keep in mind if you
changed any environment setting from a default project or solution you will
need to do this again (e.g., adding special resources).
And one one comment. Whenever my code has acted differently in the 'debug'
and 'release' versions it is becuase I have some fundamental bug causing
unpredictable behavior. For example, I once used the wrong 'flavor' of Timer
class in my program. As a bit of info on the subject, there are a few
classes unfortunately all called Timer class (in different namespaces
though) that look similar and seem to have the same functionalty, but differ
in that some can only be used for some operations (such as changing stuff on
forms) while other Timer class instances will cause random problems if
attempted to be used for the same thing. As I said, I 'accidentally' used
the wrong Timer class which worked in Debug but not in Release. When I used
the correct Timer class, it worked flawlessly in both Debug and Release.
Thus, you might look for some fundamental bug in your code that just happens
to work occasionally. Events and Timers and things that work in threads and
anything asynchonously, is prone to odd bugs that happen at odd times
without ease of reproducability. These are the kind of bugs to avoid at all
costs, as they can make it to the end product if rare enough!
My 2 cents...
[==Peter==]
> My code has suddenly stopped compiling after some refactoring I carried
> out last week. I am using VC8 on W2K professional
[quoted text clipped - 19 lines]
> Articles on MSN and Google are of no use - anybody knows how I may fix
> this ?