Re: compile and link comedi question

[...]
> 2) Tested successfully in comedilib/demo. We wrote a small program to
> read and write. It is working.
>  My question is how to use this driver with my real time programming
> running under LXRT.  Compile of my program is fine with -lcomedi linking
> flag. But when I ran it, program complain about missing shared linbrary
> libcomedi-0.7-21.so. So I did a cd /lib

You have to link with libkcomedilxrt.a (provided by rtai) _instead_ of
with (the userspace library) libcomedi.a (or .so when linking dynamically!

> ln -s /home/everett/comedi/comedilib/lib/.lib/libcomedi-0.7-21.so .
> because that was the only libcomedi.so on my PC.

> Now when I run my program, it complains that it can't open "/dev/comedi0". Do anyone know what is going on? It is perplexing since the program used the same instructions as in our working test program on the same hardware.

After that load the necessary modules, comedi_config your driver, modprobe
kcomedilib and things should be working fine.

ps.  You could also first test your driver without rtai by writing a small
kernel module in which you do your reading and writing.

klaas

Received on 2004-07-12Z18:51:02