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] Building with Visual Studio Professional 2013 ...

From: Pascal Quantin <pascal.quantin@xxxxxxxxx>
Date: Tue, 29 Apr 2014 08:03:36 +0200

Le 29 avr. 2014 06:03, "Bill Meier" <wmeier@xxxxxxxxxxx> a écrit :
>
> On 4/27/2014 6:16 PM, Richard Sharpe wrote:
>>
>>
>> Woohoo! It works!
>>
>
> With 1 caveat...   :)
>
> I expect that probably trying to use Lua with Wireshark built with VS2013 will fail in some manner.
>
> Currently, building with VS2013 (VC12) is configured to link with a Lua DLL which is linked with the VS2010 (VC10) msvcrt. I expect this  will cause problems.
>
> (Fpom config.nmake)
>
> !IF "$(MSVC_VARIANT)" == "MSVC2012" ||  "$(MSVC_VARIANT)" == "MSVC2012EE"
> LUA_DIST=-5.2.3_Win64_dll11
> !ELSE
> LUA_DIST=-5.2.3_Win64_dll10
> !ENDIF
> LUA_DIR=$(WIRESHARK_LIB_DIR)\lua5.2.3
>
>
>
> Pascal recently did the work to use the correct Lua DLL with VS2012 (VC11) (..dll11).  Hopefully there's a VS2013 version of the Lua DLL which can be used when building with VS2013 (VC12)
>
>
>
>
> Bill
>
> P.S.
>
> As part of the process of doing a first Wireshark build with VC2013, I somehow managed to link with the VS2012 Lua DLL even though the config.nmake selects the VS2010 version. (I think this happened because I first built with VS2012 then did a 'clean' (without re-creating the win32 libraries) and then built with VS2013).
>
>
> It took me a little while to realize what was going on.
>
> I guess one has to be very careful when developing with multiple VS versions since what are effectively different DLL's (i.e. linked with different versions of msvcrt) will have the same name.
>
> I wonder if there's a way to check at link time (or run-time) that the right version (linked with the right msvcrt) is being used ....

The SourceForge page for Lua includes the library for MSVC2013 so we could use it. But I'm starting to think that we might compile Lua during the build process instead (as we do for zlib) to avoid any msvcrt mismatch in the future.