Fatal errors C1047 and C1900
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3

Thread: Fatal errors C1047 and C1900

  1. #1
    John E is offline Elite Member Power Poster
    Join Date
    Apr 2001
    Location
    Manchester, England
    Posts
    4,242

    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:-

    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:-

    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?
    "A problem well stated is a problem half solved. - Charles F. Kettering

  2. #2
    Join Date
    Apr 2000
    Location
    Belgium (Europe)
    Posts
    3,886

    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.

  3. #3
    John E is offline Elite Member Power Poster
    Join Date
    Apr 2001
    Location
    Manchester, England
    Posts
    4,242

    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.
    "A problem well stated is a problem half solved. - Charles F. Kettering

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Windows Mobile Development Center


Click Here to Expand Forum to Full Width

This is a CodeGuru survey question.


Featured


HTML5 Development Center