I've tested this and it seems to be some kind of code generation / optimization issue with Visual C++ 2022...?
I create LibRaw as a static library.
When I use the debug build, the decoder_name returned is "jxl_dng_load_raw_placeholder()".
When I compile the release build with optimizations disabled (/Od) or set to Optimizations (Favor Speed) (/Ox), the decoder_name returned is also "jxl_dng_load_raw_placeholder()".
But when I build release with Maximum Optimization (Favor Speed) (/O2), the decoder_name is set to "vc5_dng_load_raw_placeholder()"
Looking at the LibRaw source, this should only happen when USE_GPRSDK is defined (it is not in my build) so I can only assume that there is some sort of compiler error or wrong jump produced when optimizing that case statement when the /O2 is enabled.
I've tested this and it seems to be some kind of code generation / optimization issue with Visual C++ 2022...?
I create LibRaw as a static library.
When I use the debug build, the decoder_name returned is "jxl_dng_load_raw_placeholder()".
When I compile the release build with optimizations disabled (/Od) or set to Optimizations (Favor Speed) (/Ox), the decoder_name returned is also "jxl_dng_load_raw_placeholder()".
But when I build release with Maximum Optimization (Favor Speed) (/O2), the decoder_name is set to "vc5_dng_load_raw_placeholder()"
Looking at the LibRaw source, this should only happen when USE_GPRSDK is defined (it is not in my build) so I can only assume that there is some sort of compiler error or wrong jump produced when optimizing that case statement when the /O2 is enabled.