[wix-devs] Static libraries across VS versions

Bob Arnson bob at firegiant.com
Mon Dec 6 09:09:59 PST 2021


Basically what we're doing today. :sad_face:

-----Original Message-----
From: wix-devs <wix-devs-bounces at lists.wixtoolset.org> On Behalf Of Rob Mensching via wix-devs
Sent: Monday, 6 December, 2021 11:40
To: WiX Toolset Developer Mailing List <wix-devs at lists.wixtoolset.org>
Cc: Rob Mensching <rob at firegiant.com>
Subject: Re: [wix-devs] Static libraries across VS versions

So we can standardize on VS2022 and build the libraries only once but will still need to build the libraries using the "v140" toolset (or "v141" if we dump VS2015 support or "v142" if we dump VS2017 support).

Too bad it isn't the other way around.

-----Original Message-----
From: wix-devs <wix-devs-bounces at lists.wixtoolset.org> On Behalf Of Sean Hall via wix-devs
Sent: Monday, December 6, 2021 8:30 AM
To: WiX Toolset Developer Mailing List <wix-devs at lists.wixtoolset.org>
Cc: Sean Hall <r.sean.hall at gmail.com>
Subject: Re: [wix-devs] Static libraries across VS versions

Microsoft explicitly does not support this - https://docs.microsoft.com/en-us/cpp/porting/binary-compat-2015-2017.

* You can mix binaries built by different versions of the v140, v141, v142, and v143 toolsets. However, you must link by using a toolset at least as recent as the most recent binary in your app. Here's an example: you can link an app compiled using any 2017 toolset (v141, versions 15.0 through
15.9) to a static library compiled using, say, Visual Studio 2019 version
16.2 (v142). You just have to link them by using a version 16.2 or later toolset. You can link a version 16.2 library to a version 16.4 app as long as you use a 16.4 or later toolset.

On Sun, Dec 5, 2021 at 5:21 PM Bob Arnson via wix-devs < wix-devs at lists.wixtoolset.org> wrote:

> I'll open an issue but wanted to get a head start. I gave myself the 
> action item (oh god, I can't believe I just said that) to investigate 
> whether we could build our static libraries with the latest VS and use 
> them "down-level" on earlier versions of VS. The answer...
>
> ...is yes, we can. I built DUtil with VS2022 and with some tweak to 
> the nupkeg was able to consume it from a project originally built with
> VS2019 and subsequently built with VS2017. It's not an exhaustive test
> - console, string, proc -- but I suspect that it was more of a pass/fail test.
>
> Questions:
>
>
>   1.  Should we do this? (I vote +1.)
>   2.  Should we do this now, with VS2019 as the baseline?
>   3.  Should we decide now to use VS2022 as the baseline?
>
> ____________________________________________________________________
> WiX Toolset Developer Mailing List provided by FireGiant 
> http://www.firegiant.com/
>
____________________________________________________________________
WiX Toolset Developer Mailing List provided by FireGiant http://www.firegiant.com/ ____________________________________________________________________
WiX Toolset Developer Mailing List provided by FireGiant http://www.firegiant.com/



More information about the wix-devs mailing list