invalid use of undefined type ‘struct comedi_t_struct’

Hello all

I am trying to understand -why when I compile my code- I am getting the
error message "invalid use of undefined type 'struct comedi_t_struct'." We
have a NI 6221. We've compiled 0.7.73 on a kernel 2.6.15 on an ubuntu
system. I'm not too sure if I am having a C or a Comedi problem (or both).

 The code is
//***************************


 comedi_t *device;

int i;


 device = comedi_open(filename);

if (!device)

{

comedi_perror(filename); /* We couldn't open the device - error out */

} else

{

printf("opened\n");

}


 i = device->n_subdevices;    //   this is the offending line 110

 //***************************


 more fully the message is:


 daq1.c: In function 'main':

daq1.c:110: error: invalid use of undefined type 'struct comedi_t_struct'

daq1.c:110: error: dereferencing pointer to incomplete type


 when the offending line is removed, the device opens just fine. In fact I
have used the comedi_get_n_subdevices() function but I want to find out what
I have on the board from the comedi_t struct. Any advice at all would be
appreciated.


 Thanks for the help (or at least reading this far)

George

Received on 2007-08-02Z19:36:53