Re: [Hamlib-developer] Generating a .lib for a .dll: W11, MSVC 2022
Library to control radio transceivers and receivers
Brought to you by:
n0nb
From: <gm...@bt...> - 2024-11-12 21:45:54
|
Sussed it. Use the utility lib.exe. Open "Developer PowerShell for VS 2022" in administrator mode. (open Terminal, then click the pulldown menu to select "Developer...", right click, run as administrator). Then in the hamlib install directory... cd lib/msvc lib /def:libhamlib-4.def /machine:x64 If you use another terminal app, then the full path of lib.exe may be required. But it must be run in administrator mode if the hamlib install is, as suggested, in "C:/Program Files". I managed to get it to compile and build OK under MSVC 2022. Not tested connecting to a rig as I don't have one connected to this laptop at the moment. The path of my lib.exe is C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.41.34120\bin\Hostx64\x64. I don't know where the change from link.exe to lib.exe came in. 73 Phil GM3ZZA ________________________________ From: gm3zza--- via Hamlib-developer <ham...@li...> Sent: 12 November 2024 8:39 PM To: Michael Black via Hamlib-developer <ham...@li...> Subject: [Hamlib-developer] Generating a .lib for a .dll: W11, MSVC 2022 I have a problem compiling using the latest download of the daily update to W11. I last did this on 8 September, and managed to fix it but didn't note down what I did. I have a vague recollection it involved using link.exe. I looked in README-w64-bin.txt and my MSVC has a different version. According to the latest MS help, link.exe does no longer have a parameter /LIB, so doesn't seem to be able to generate the .lib file. The help says link.exe will create a .dll or .exe from a .lib, but not the other way. I launched Developer PowerShell for VS:2022, and only need to run link.exe without the full path. However I can't find a way yet to produce the .lib from the .dll. I'll continue looking. Phil GM3ZZA |