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 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01XZnuZJ7zc3e8hk6C8bGDZN
This commit is contained in:
+3
-2
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user