question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

MSVC compiler.version is not allowed to contain `.`

See original GitHub issue

We needed to keep track of subversions of MSVC, i.e. 16.8 vs 16.9. Why? because MSVC LTCG (LTO) is not compatible between minor versions. So if you compile a static library with LTCG in 16.8 you can’t link it to with 16.9.

We thought this was a easy solution - just change compiler.version to 16.8 instead of 16. But there are several assumptions in the conan codebase about the value of this setting, here is one: https://github.com/conan-io/conan/blob/develop/conans/client/tools/win.py#L429

For now I am adding compiler.minorversion but maybe this should be fixed.

Issue Analytics

  • State:open
  • Created 2 years ago
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
trucommented, Apr 28, 2021

No I was not aware of that - we are a bit behind on our conan versions. But that sounds good.

1reaction
trucommented, Apr 28, 2021

guessing this is the best source of the information: https://docs.microsoft.com/en-us/cpp/error-messages/compiler-errors-1/fatal-error-c1047?view=msvc-160

For example, you can't link a /LTCG library built by using Visual Studio 2019 version 16.7 to an app built by using Visual Studio 2019 version 16.8

But basically this is the same for GCC and Clang LTO as well. When using LTO/LTCG static libraries will contain the .o files that are NOT objects - they are just “bitcode” that is only supposed to be consumed by the same compiler that created it.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Compiler Warnings by compiler version | Microsoft Learn
Table of Microsoft C/C++ compiler warnings by compiler version.
Read more >
MSVC - do not display compiler version/copyright information
If I need the compiler version for debugging I should be able to do something like cl -v similar to g++ for UNIX....
Read more >
Incorrect handling of MSVC versions · Issue #3573 · conan-io ...
I am using Conan v1.7.4. I've created a static library Conan package using VS 2017 15.7 and updated my Visual Studio to 15.8....
Read more >
Compiler Version Problem | FreeLing Home Page
MSVC is not able to link… ... If you build FreeLing with a version different than the one used to build the dependencies...
Read more >
Configure VS Code for Microsoft C++
If you have a recent version of Visual Studio, open the Visual Studio Installer from the Windows Start menu and verify that the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found