Can't compile the random-test-server.c

14 views
Skip to first unread message

Nidhin Benny

unread,
Nov 1, 2024, 7:39:19 PM11/1/24
to libm...@googlegroups.com
Hi, 

Downloaded and installed libmodbus as per the instructions in the readme file on my orangepi development board (running ubuntu 22.04 jammy). I tried to compile the random-test-server.c in the "tests" folder. gcc gives me an error saying "modbus.h" does not exist. How can I solve this?

Regards
Message has been deleted

Emrah Ali PEKDEMİR

unread,
Nov 20, 2024, 8:32:33 AM11/20/24
to libmodbus
Hi,

The header file is included as such:

#include <modbus/modbus.h>

Also you need to include the library as you compile as such:

gcc random-test-server.c -o random-test-server -Wall -lmodbus

Regards,
Reply all
Reply to author
Forward
0 new messages