My Visual Studio 2017 C++ project takes as inputs:
- Source code
- Library compiled by VS2015
- Library compiled by 3rd party using VS2017
The linker gives errors:
1> functionallib.lib(bcp_toplevel.obj) : MSIL .netmodule or module compiled with /GL found; restarting link with /LTCG; add /LTCG to the link command line to improve linker performance
1>LINK : fatal error C1900: Il mismatch between 'P1' version '20161212' and 'P2' version '20150812'
1>LINK : fatal error LNK1257: code generation failed
My understanding is that VS2015 and VS2017 libraries are binary compatible so I am surprised by this error.
How can I diagnose exactly what is wrong and how can I fix it?