Getting error while building Libraw in Qt in windows environment


I am trying to build Libraw in Qt (windows environment) getting bellow errors.

:-1: error: debug-x86_64/libraw.obj/decoders_dcraw.o: in function `LibRaw::sony_load_raw()':
D:\LibRaw-0.21.2\LibRaw-0.21.2\src\decoders\decoders_dcraw.cpp:1433: error: undefined reference to `__imp_ntohs'
:-1: error: debug-x86_64/libraw.obj/fp_dng.o: in function `LibRaw::uncompressed_fp_dng_load_raw()':
D:\LibRaw-0.21.2\LibRaw-0.21.2\src\decoders\fp_dng.cpp:623: error: undefined reference to `__imp_ntohs'
Seams it fails to Linking to the library that contains ntohs. This is usually ws2_32.lib.

could you please help how to resolve this.


Image icon LibrawLinkingError.png179.75 KB


yes, you probably need to add

yes, you probably need to add ws2_32 to your linker input.

-- Alex Tutubalin @LibRaw LLC