Help Me With Cross compilation Of Arm-linux -gcc with respect to MODBUS
[root@karthik modbus1]# arm-linux-gcc -o modclient modclient3.c -lmodbusmodclie
modclient3.c: In function 'main':
modclient3.c:14: error: 'modbus_t' undeclared (first use in this function)
modclient3.c:14: error: (Each undeclared identifier is reported only once
modclient3.c:14: error: for each function it appears in.)
modclient3.c:14: error: 'ctx' undeclared (first use in this function)
modclient3.c:15: error: 'uint8_t' undeclared (first use in this function)
modclient3.c:15: error: expected ';' before 'value'
modclient3.c:16: error: 'query' undeclared (first use in this function)
modclient3.c:26: error: 'uint16_t' undeclared (first use in this function)
modclient3.c:26: error: 'tab_rp_registers' undeclared (first use in this function)
modclient3.c:30: error: 'TRUE' undeclared (first use in this function)
modclient3.c:32: error: expected expression before ')' token
modclient3.c:39: warning: format '%s' expects type 'char *', but argument 3 has type 'int'
modclient3.c:82: error: 'EMBXILADD' undeclared (first use in this function)
I tried exporting path for modbus.h:result it didnt work
Then I copied all the header files of modbus.h and others into the directory where the program:it didnt work
then I even copied /libmodbus/src into the directory too:still it didnt work
i even done arm-linux-gcc -l /usr/local/include -o modclient modclient3.c -lmodbus :it didnt work
please help.
P.S:normal compilation gcc -o modclient modclient3.c -lmodbus works fine and even executed the program with success.
Question information
- Language:
- English Edit question
- Status:
- Solved
- For:
- libmodbus Edit question
- Assignee:
- No assignee Edit question
- Solved by:
- Karthik.K.M.
- Solved:
- Last query:
- Last reply: