ANNOUNCEMENT: Live Wireshark University & Allegro Packets online APAC Wireshark Training Session
April 17th, 2024 | 14:30-16:00 SGT (UTC+8) | Online

Wireshark-dev: Re: [Wireshark-dev] Visual Studio 2013/2015/2017 compatibility and libraries

From: Pascal Quantin <pascal.quantin@xxxxxxxxx>
Date: Mon, 24 Apr 2017 16:26:26 +0200


2017-04-24 16:15 GMT+02:00 Peter Wu <peter@xxxxxxxxxxxxx>:
On Mon, Apr 24, 2017 at 03:56:14PM +0200, Pascal Quantin wrote:
> Hi Peter
>
> 2017-04-24 15:43 GMT+02:00 Peter Wu <peter@xxxxxxxxxxxxx>:
>
> > Hi,
> >
> > Are there possible issues to be aware of when using the libraries (built
> > with mingw/msvc2013) with the Wireshark binaries built with VS2017?
> > When trying it with a friend, it seems to build and run with no issues.
> >
> > I thought that there can be problems with combining different MSVC
> > runtime versions in one binary? Looking through the libraries, it seems
> > that there is a combination of at least MingW (GeoIP?) and MSVC (Lua).
> > (And apparently VS2015 (14.0) and VS2017 (14.1) are binary compatible.)
> >
>
> Just a side note: most of our 3rd party libraries are compiled with
> MinGW(32|64) except zlib (that we compile from scratch if I remember
> properly, cannot check right now), Lua for 2.0.X and 2.2.X and Qt.
> Historically we were using a MinGW Lua build but that was triggering a
> specific MinGW bug and we switched to MSVC based Lua library to work around
> this. But it required us to package Lua for every supported MSVC variants
> (as you need to have the corresponding C runtime installed on your PC while
> Wireshark installer packages the C runtime of the version you used to
> compile), which was painful. That's also why it is highly suggested to
> install the Qt package matching the MSVC version you intend to use for
> compilation.
> Since the MinGW bug was fixed, so master branch is again using the MinGW
> based Lua library.

Ah ok, so that is why there is a whole list of Lua versions. Shouldn't
the msvc versions then be cleaned from the wireshark-win64-libs repo if
the mingw build works again?

I did not change it yet because of master-2.0 and master-2.2 branches (they use the same repo).
Once they are out of support, I will remove them from our repo.
 

And is linking against MingW C libraries (which uses the old msvcrt.dll)
always supported and not conflicting with the runtime used by the
Wireshark build?

So far so good, but I'm not an expert in this area. Hopefully this will never become a problem, otherwise it will be painful to rebuild all dependencies...
 

> The only pre-compiled 3rd party package built with MSVC I can think to
> right now is Qt.

Qt is a C++ library, so I think there is no way to use different MSVC
versions here since there is no ABI guarantee between versions. When you
try to build it with the wrong version anyway, you'll get a compile
error due to a pre-processor check in some Qt header (this happened when
trying VS2017 with Qt 5.6 msvc2013).

> As of today they offer MSVC2013 and MSVC2015 flavors (there is also a
> MinGW build but for 32 bits only). It looks like Qt 5.9 will provide a
> MSVC2017 version according to
> http://lists.qt-project.org/pipermail/development/2016-December/028159.html

MSVC 2015/2017 are ABI compatible, so it already works even if there is
no official 2017 version yet.

But presumably you still have the C runtime dependencies (note that I never used MSVC2015/2017 myself so this is really an assumption).


> I think Graham proposed to discuss which MSVC to use (for 2.5 I guess)
> during Sharkfest US.

Yes, that was for post-2.4, but I was wondering whether it is currently
usable. I saw an earlier post from Anders which uses MSVC2015, so
apparently it can work?  What version are you using?
--
Kind regards,
Peter Wu
https://lekensteyn.nl
___________________________________________________________________________
Sent via:    Wireshark-dev mailing list <wireshark-dev@xxxxxxxxxxxxx>
Archives:    https://www.wireshark.org/lists/wireshark-dev
Unsubscribe: https://www.wireshark.org/mailman/options/wireshark-dev
             mailto:wireshark-dev-request@wireshark.org?subject=unsubscribe