I am having compile issues with libmodbus. I have the following code
boost::shared_ptr <modbus_t> ctx;
ctx->modbus_new_tcp(ip_address.c_str(), modbus_port);
but I get the following error
error: invalid use of incomplete type 'struct _modbus'
it points to this line in modbus.h
typedef struct _modbus modbus_t;
I do not understand enough about this to troubleshoot my problem. What do you think it is? Is this library not comptatible with a smart pointer? They tell you to use a regular pointer
modbus_t* ctx;
Thank you.