[wix-devs] Static libraries across VS versions

Sean Hall r.sean.hall at gmail.com
Mon Dec 6 10:04:38 PST 2021


With that line of reasoning, we would have to build each toolset with the
version of Visual Studio that introduced it. Hopefully that's not necessary.

On Mon, Dec 6, 2021 at 11:57 AM Bob Arnson via wix-devs <
wix-devs at lists.wixtoolset.org> wrote:

> We still need to build the libraries for each toolset version (per the
> article Sean pointed out) because a VS2017 user won't be using the VS2022
> linker. IOW, they maintained backward compatibility but not forward
> compatibility. (Or at least don't guarantee it.)
>
> -----Original Message-----
> From: Rob Mensching <rob at firegiant.com>
> Sent: Monday, 6 December, 2021 12:50
> To: Bob Arnson <bob at firegiant.com>; WiX Toolset Developer Mailing List <
> wix-devs at lists.wixtoolset.org>
> Subject: RE: [wix-devs] Static libraries across VS versions
>
> But today, we're building the libs multiple times (one for each supported
> v14x and architecture). Now we'll be able to build each project
> per-architecture. That's a nice reduction in .lib build matrix, right?
>
> -----Original Message-----
> From: Bob Arnson <bob at firegiant.com>
> Sent: Monday, December 6, 2021 9:10 AM
> 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
>
> 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/
> ____________________________________________________________________
> WiX Toolset Developer Mailing List provided by FireGiant
> http://www.firegiant.com/
>



More information about the wix-devs mailing list