On Linux, a libmodbus package is provided for the following distributions:
pacman -S libmodbus
rpm -i libmodbus
apt-get install libmodbus
On MacOS, the package is available via Homebrew
brew install libmodbus.
Compilation from official releases
You can compile
libmodbus from tarball releases by downloading the latest stable release.
The official tarball to use is the asset with a icon.
A C toolchain should be installed in your environment:
For Visual Studio, set your platform to x64 and make sure your set these settings in the project property pages:
- General / Project Defaults / Configuration Type, Dynamic Library (.dll)
- Linker / Input / Additional Dependencies, ws2_32.lib
All version changes are described at GitHub releases.
To compile this snippet, you can pass the header and library parameters to your
C compiler (
llvm, ...) with
pkg-config --cflags --libs libmodbus:
The new documentation is unified for all releases, changes and additions to each version are indicated. The documentation is updated at each release.
If you need to read the old documentation, the format of the old URL is https://libmodbus.org/olddocs/v3.1.7/libmodbus where
v3.1.7 can be replaced by the version you're looking for.