crashpad: Incompatible with different versions of VS2017 and VS2019

We have version 15.7 of VS2017 and this pre-built lib of Crashpad is built with a different version of VS2017. VS2017 does offer binary compatibility with different versions, but that isn’t the case if the /GL ( Whole program optimization ) flag is on.

When I try using the library with VS2017 I get an initial C1047 error which is the first indication that something is wrong https://docs.microsoft.com/en-us/cpp/error-messages/compiler-errors-1/fatal-error-c1047?view=vs-2019

I can then workaround that error with the following undocumented linker switch to get a little more information. /d2:-AllowCompatibleILVersions

Then I get the following errors which give more specifics

6>client.lib(client.crash_report_database_win.obj) : MSIL .netmodule or module compiled with /GL found; restarting link with /LTCG; add /LTCG to the link command line to improve linker performance
6>LINK : fatal error C1900: Il mismatch between 'P1' version '20180423' and 'P2' version '20180214'
6>LINK : fatal error LNK1257: code generation failed

About this issue

  • Original URL
  • State: closed
  • Created 7 years ago
  • Comments: 16 (8 by maintainers)

Commits related to this issue

Most upvoted comments

Here you go (lib_nogl): [link]

Hi Adam. I have prepared a build in accordance with your instructions: [link].

It does “just work” with my VS 15.9.21. Could you verify if the problem has been solved?

@adammarks Just to be certain, are you linking against libs from the lib_nogl folder? I am getting fatal error C1007: unrecognized flag '-pdbrpc' in 'p2' when linking against lib_mt in my last build.

No, I completely missed that there was a new folder! I will try the nogl libs.

Hi Adam! Thanks for this. Our team is looking into this and looks like there is a corresponding ZenDesk ticket.