Il mismatch between 'P1' version '20080116' and 'P2' version '20070207'

前端 未结 4 1436
死守一世寂寞
死守一世寂寞 2021-01-04 12:18

I am building MFC application which uses other c++ library.I am using vs 2008 and compiled all the library project in vs 2008.

It is compiling well in debug mode but

相关标签:
4条回答
  • 2021-01-04 12:33

    I had this problem just with other numbers as well using Visual studio 2015. The problem was in one of the libraries that I linked to my project was build using VS2015 Update 3. The solution that worked for me - update Visual Studio to 2015 Update 3.

    0 讨论(0)
  • 2021-01-04 12:34

    In Microsoft terminology, P1 is the parser (front-end), and P2 is the code generator (back-end). With link-time code generation (LTGC) enabled, the result of P1 is stored in a file and P2 is performed later at link time.

    If you downgraded your compiler, you should do a full rebuild, otherwise the link step will try to use the incompatible P1 output, which will trigger that error.

    If you upgraded the compiler, Visual Studio automatically does a full rebuild, so this should never happen (if it does anyway, just perform a full rebuild).

    0 讨论(0)
  • 2021-01-04 12:35

    If compiling a solution with multiple projects you should compile all projects with the same compiler (version) to be sure it works.

    I once got the same error message like you. If I remember correctly the problem occured because link time code generation was used. My solution was to rebuild all, another solution might have been disabling link time code generation.

    0 讨论(0)
  • 2021-01-04 12:37

    In my case, I just installed Microsoft Visual Studio 2008 Service Pack 1 (Installer) which resolved the problem. Service Pack can be downloaded from following link:

    https://www.microsoft.com/en-us/download/confirmation.aspx?id=10986

    SAM

    0 讨论(0)
提交回复
热议问题