[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Build libmodbus, linker error
From: |
Wagner, Martin |
Subject: |
Build libmodbus, linker error |
Date: |
Wed, 21 Dec 2022 15:01:25 +0000 |
Hi,
I'm trying to build libmodbus (https://libmodbus.org/), but run into a linker
error:
"/usr/bin/ld: cannot find -lwsock32"
libmodbus is a c library and uses autotools, so nothing special.
I've tried the steps from the tutorial, also the ones with additional configure
flags, but I always get the same error. Did I miss something?
Thank you for your help!
Regards,
Martin
-------
mxe build command:
$ make qt6-qtbase boost MXE_TARGETS='x86_64-w64-mingw32.shared'
-------
package build command (as in tutorial for autotools, except for "shared"):
$ export PATH=/opt/mxe/usr/bin:$PATH
$ ./autogen.sh
$ ./configure --host=i686-w64-mingw32.shared
$ make
-----
Error output:
make --no-print-directory all-recursive
Making all in src
CC modbus.lo
CC modbus-data.lo
CC modbus-rtu.lo
CC modbus-tcp.lo
CCLD libmodbus.la
*** Warning: linker path does not have real file for library -lwsock32.
*** I have the capability to make that library automatically link in when
*** you link to this library. But I can only do this if you have a
*** shared version of the library, which you do not appear to have
*** because I did check the linker path looking for a file starting
*** with libwsock32 but no candidates were found. (...for file magic test)
*** The inter-library dependencies that have been dropped here will be
*** automatically added whenever a program is linked with this library
*** or is declared to -dlopen it.
*** Since this library must not contain undefined symbols,
*** because either the platform does not support them or
*** it was explicitly requested with -no-undefined,
*** libtool will only create a static version of it.
Making all in tests
make all-am
CC bandwidth-server-one.o
CCLD bandwidth-server-one
/usr/bin/ld: cannot find -lwsock32
collect2: error: ld returned 1 exit status
make[3]: *** [Makefile:650: bandwidth-server-one] Fehler 1
make[2]: *** [Makefile:586: all] Fehler 2
make[1]: *** [Makefile:498: all-recursive] Fehler 1
make: *** [Makefile:384: all] Fehler 2
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Build libmodbus, linker error,
Wagner, Martin <=