- From: Fei Chu <kelvinchufei_at_gmail.com>
- Date: Sat, 6 Jan 2007 17:34:11 -0600
Hi,
I am doing with the comedi+RTAI on a NI PCI-6259 DAQ Card.
I've got the comedi cmd program and test program running correctly.
When I try to write my own program, starting with the one in the tutorial
#include <stdio.h> /* for printf() */
#include <comedilib.h <http://www.comedi.org/doc/x4003.html#COMEDI-COMEDILIB-H>>
int subdev = 0; /* change this to your input subdevice */
int chan = 0; /* change this to your channel */
int range = 0; /* more on this later */
int aref = AREF_GROUND
<http://www.comedi.org/doc/x4003.html#AREF-GROUND>; /* more on this
later */
int main(int argc,char *argv[])
{
comedi_t <http://www.comedi.org/doc/x4003.html#REF-TYPE-COMEDI-T> *it;
lsampl_t <http://www.comedi.org/doc/x4003.html#REF-TYPE-LSAMPL-T> data;
it=comedi_open <http://www.comedi.org/doc/r4226.html>("/dev/comedi0");
comedi_data_read
<http://www.comedi.org/doc/r5021.html>(it,subdev,chan,range,aref, &
data);
printf("%d\n",data);
return 0;
}
When I
cc tut1.c -lcomedi -o tut1
I got the following error
/usr/local/lib/libcomedi.so: undefined reference to `lrint'
collect2: ld returned 1 exit status
I think this error should be about some settings of the lib directory.
But I'm not quite sure. Can anyone help me have a look at on this?
Thanks.
Kelvin
Received on 2007-01-06Z23:34:11