librist fails compiling in MSYS2/MinGW64/GCC 13.2 in libmbedcrypto.a(entropy_poll.c.obj): undefined reference to `BCryptGenRandom'
I use the media-autobuild suite co build a static ffmpeg for Windows in an MSYS2 environment with MinGW32 or MinGW64 and GCC 13.2. Currently I changed the script back to revert a previous change, because MSYS2 does not ship cJSON for MinGW32 anymore I reenabled the use of librist's internal cJSON: extracommands=("-Dbuiltin_cjson=true")
The MinGW32 pass builds librist without an error: librist-git/build-32bit/ab-suite.build.log
The MinGW64 pass now fails: librist-git/build-32bit/ab-suite.build.log
[42/54] Linking target tools/ristsender.exe
FAILED: tools/ristsender.exe
"gcc.bat" -o tools/ristsender.exe tools/ristsender.exe.p/ristsender.c.obj tools/ristsender.exe.p/oob_shared.c.obj tools/ristsender.exe.p/srp_shared.c.obj tools/ristsender.exe.p/.._contrib_getopt-shim.c.obj tools/ristsender.exe.p/.._contrib_time-shim.c.obj tools/ristsender.exe.p/.._contrib_pthread-shim.c.obj "-Wl,--allow-shlib-undefined" "-Wl,-O1" "-fstack-protector-strong" "-mtune=generic" "-O2" "-pipe" "-static-libgcc" "-static-libstdc++" "-D_FORTIFY_SOURCE=2" "-fstack-protector-strong" "-mtune=generic" "-O2" "-D__USE_MINGW_ANSI_STDIO=1" "-mthreads" "-Wl,--start-group" "librist.a" "-pthread" "-lws2_32" "-lmbedcrypto" "-lws2_32" "-liphlpapi" "-lmbedcrypto" "-Wl,--subsystem,console" "-lkernel32" "-luser32" "-lgdi32" "-lwinspool" "-lshell32" "-lole32" "-loleaut32" "-luuid" "-lcomdlg32" "-ladvapi32" "-Wl,--end-group"
G:/MABS/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: G:/MABS/msys64/mingw64/lib/../lib/libmbedcrypto.a(entropy_poll.c.obj):(.text+0x43): undefined reference to `BCryptGenRandom'
collect2.exe: error: ld returned 1 exit status
Full set of log files collected by M-AB-S: logs.zip