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] Is there any reason to give our libraries "libXXX.{dll, lib}

From: Graham Bloice <graham.bloice@xxxxxxxxxxxxx>
Date: Thu, 10 Jul 2014 07:30:34 +0100
On 10 July 2014 02:06, Guy Harris <guy@xxxxxxxxxxxx> wrote:
On UN*X, the file names for libraries begin with "lib" - the linkers all look for "libfoo.*" if you link with "-lfoo".

On Windows, that's not the case.

Is there any reason for us to put "lib" at the beginning of the file names for the wsutil, wiretap, wireshark, etc. libraries?  I infer from

        https://code.wireshark.org/review/2957

that CMake might, by default, not put "lib" there, requiring us to, in the CMake build, force it to be there on Windows by adding some stuff to the CMakeLists.txt files.

I can confirm that Windows CMake has an empty "prefix" value and authored that change only to make things the same as the nmake build.  I'm not fussed either way, but changing the library names may have consequences for the installer as well.  Currently I haven't got the windows CMake as far as building an installer yet.

Note that on Windows nmake, filetap and wiretap don't get a "lib" prefix, instead they get a version suffix, e.g. "wiretap-1.99.0.dll"

One other piece of info, without this change, CMake produces a wireshark.exe and a wireshark.dll and the .pdb file for the dll gets overwritten by the one for the exe.

--
Graham Bloice