pugixml: binary is incompatible after update of VisualStudio 2017

After update of Visual Studio 2017 from version 15.0 to 15.3 I started getting the following errors:

LINK : fatal error C1047: The object or library file 'C:\projects\build\msvs_solution\packages\pugixml.1.8.3\build\native\lib/Win32\v141\dynamic\Release\pugixml.lib' was created with an older compiler than other objects; rebuild old objects and libraries [C:\projects\build\msvs_solution\render_test\render_test.vcxproj]

you can find the build log of my project here https://ci.appveyor.com/project/igagis/svgren/build/master-395

Looks like the pugixml nuget package has to be rebuild with latest VS2017.

About this issue

  • Original URL
  • State: closed
  • Created 7 years ago
  • Comments: 18 (17 by maintainers)

Commits related to this issue

Most upvoted comments

Ugh. Apparently

C1047 is caused when object files or libraries built with /LTCG are linked together, but where those object files or libraries are built with different versions of the Visual C++ toolset.

So I’ll have to disable LTCG and rebuild pugixml to avoid version conflicts (if I just rebuild with the latest VS2017 that will presumably break compatibility with 15.0).

My guess is that 15.0 used the same IL format as VS2015, but 15.3 bumped it which started causing these mismatches. The fact that this makes LTCG binaries incompatible between 15.0 and 15.3 is pretty annoying.

I’ve uploaded package 1.8.5 which should hopefully resolve this (has LTCG disabled and is actually using VS2017…).

Yeah I’m trying to rebuild with LTCG enabled but with correct toolset this time.

@igagis I’ve uploaded new package version 1.8.4; it still works with VS2017 15.0 - can you check if it fixes the build with 15.3?