I am sorry to ask but I am new to this whole 'shared library'/c stuff. As I understand it there are two way of accessing my IOW24. One through simple select()/read()/write() operations and the other through the iowkit API. Right? I managed to compile this library on my linux(debian) box and ended up with a libiowkit.so in the src directory. All nice and well, but how do I use it?? I read the "IOWarrior Library.pdf" and tried the first IowKitOpenDevice example. The entire program looks like this:
Code: Select all
#include "iowarrior.h"
IOWKIT_HANDLE ioHandle;
ioHandle = IowKitOpenDevice();
int main (int argc, char **argv) {
if (ioHandle != NULL)
{
// ... success, access devices
}
else
{
// ... didn't open IoWarrior, handle error
}
}
Code: Select all
MODULE_DIR=/home/harm/share/LinuxSDK/Kernel_2.6/Driver
SO_DIR=/home/harm/share/LinuxSDK/Kernel_2.6/iowkit/src
all: advopen
clean :
rm -f advopen;
advopen : advopen.c
gcc -Wall -g -I ${MODULE_DIR} -L ${SO_DIR} advopen.c -o advopen
Does someone pity this fool and shed some light on it? Many thanks in advance.