Closed XJ-0461 closed 1 month ago
In the top level CMakeLists file, the line: set(NATS_EXTRA_LIB "Ws2_32")
set(NATS_EXTRA_LIB "Ws2_32")
Causes linker errors when cross-compiling cnats to Windows under Linux using the mingw toolchains. Because of the uppercase 'W'.
/usr/lib/gcc/x86_64-w64-mingw32/14.1.1/../../../../x86_64-w64-mingw32/bin/ld: cannot find -lWs2_32: No such file or directory
On linux libraries are case-sensitive, and can be found (depending on your toolchain choice) at:
On Windows case-sensitivity is not a problem, so changing to lowercase "ws2_32" is fine.
@mtmk @levb. If you (or someone you know) could check this out I'd appreciate it.
In the top level CMakeLists file, the line:
set(NATS_EXTRA_LIB "Ws2_32")
Causes linker errors when cross-compiling cnats to Windows under Linux using the mingw toolchains. Because of the uppercase 'W'.
/usr/lib/gcc/x86_64-w64-mingw32/14.1.1/../../../../x86_64-w64-mingw32/bin/ld: cannot find -lWs2_32: No such file or directory
On linux libraries are case-sensitive, and can be found (depending on your toolchain choice) at:
On Windows case-sensitivity is not a problem, so changing to lowercase "ws2_32" is fine.