Fatal errors C1047 and C1900
I've encountered a really bizarre problem this morning. I've been using VS2005 for many years without any problems. This morning I needed to rebuild a library called gdk-pixbuf which I've built many times before. It contains a source file called gdk-pixbuf-animation.c
If I build my Release version with Link Time Code Generation enabled I'm suddenly seeing the following error message:-
Quote:
fatal error C1047: The object or library file '.\Release\obj\gdk-pixbuf\gdk-pixbuf-animation.obj' was created with an older compiler than other objects; rebuild old objects and libraries
If I disable Link Time Code Generation I see this error instead:-
Quote:
fatal error C1900: Il mismatch between 'P1' version '20060201' and 'P2' version '20050411'
I'm totally baffled. It only seems to affect this one project (and even then, only the Release build). I've even restored a backed-up version of the vcproj file but it's no different. Can anyone hazard a guess at what might be wrong?
Re: Fatal errors C1047 and C1900
if you change LTCG on a project, you will need a REbuild the entire project. The build system doesn't really pick up on that change very well. In a few rare cases, you may even have to do a 'clean' before.
if even that doesn't help: delete the .suo file (iirc this was the .opt file in 2005) and rebuild.
Re: Fatal errors C1047 and C1900
In the end I deleted all the 'build generated' files (.suo / .ncb / .exp / .ilk / .pdb etc). Then I did a Clean, followed by a full Rebuild of the project. Voila! It seems to have worked! Many thanks for the tip. :thumb: