From cefe1f72114b902a3e851850e4a73044de67ed59 Mon Sep 17 00:00:00 2001 From: Refuhr Date: Wed, 29 Jul 2026 11:34:53 +0200 Subject: [PATCH] fix: link advapi32 for the candle API registry calls candle_scan_vidpid() reads the device registry through RegQueryValueExW and RegCloseKey. MinGW links advapi32 by default, MSVC does not, so the Windows build failed with LNK2019 on both symbols. Co-Authored-By: Claude Opus 5 Claude-Session: https://claude.ai/code/session_01XZnuZJ7zc3e8hk6C8bGDZN --- SavvyCAN.pro | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/SavvyCAN.pro b/SavvyCAN.pro index 52dce3c..7bd577e 100644 --- a/SavvyCAN.pro +++ b/SavvyCAN.pro @@ -265,8 +265,9 @@ win32 { connections/candle_api/candle_defs.h \ connections/candle_api/ch_9.h - #lower case names so this also links with a case sensitive MinGW cross toolchain - LIBS += -lsetupapi -lole32 -lwinusb + # advapi32 for the Reg* calls in candle.c - MinGW pulls it in by default, MSVC does not. + # Lower case names so this also links with a case sensitive MinGW cross toolchain. + LIBS += -lsetupapi -lole32 -lwinusb -ladvapi32 # the candle API calls the TCHAR flavour of the setupapi/strsafe functions with wide strings DEFINES += UNICODE _UNICODE