compiler can't find modbus.h
Hi all,
Just downloaded libmodbus 1.2.3 and edited the file src/Makefile.am according to revision 18. Then compiled and installed. Then I added a /usr/local/lib/ line to my /etc/ld.so.conf file and ran ldconfig as root.
When I tried to compile the test program using
gcc test-modbus.c -o test-modbus
the compiler complained with:
test-modbus.
test-modbus.c: In function ‘main’:
test-modbus.c:44: error: ‘modbus_param_t’ undeclared (first use in this function)
test-modbus.c:44: error: (Each undeclared identifier is reported only once
test-modbus.c:44: error: for each function it appears in.)
test-modbus.c:44: error: expected ‘;’ before ‘mb_param’
test-modbus.c:50: error: ‘mb_param’ undeclared (first use in this function)
test-modbus.c:51: error: ‘TRUE’ undeclared (first use in this function)
I verified that the modbus.h file exists in /usr/local/
Am I doing something wrong or have a bad gcc invocation? Any comments or suggestions are appreciated. Thanks!
Santiago
Question information
- Language:
- English Edit question
- Status:
- Solved
- For:
- libmodbus Edit question
- Assignee:
- No assignee Edit question
- Solved by:
- Stéphane Raimbault
- Solved:
- Last query:
- Last reply: