- From: <xiaomei_at_cyllene.uwa.edu.au>
- Date: Wed, 18 Aug 2004 12:41:06 +0800
I am trying some programs showing Labview for Linux being used to access Comedi
driver. I download them from NI website, inclduing AI sample.vi,etc. The .lsb
file cannot be loaded to CIN. So I think to lvmkmf it (this step didn;t show
anyerror)and then make it. Got the following error. I post the short c program
, the Makefile I got after lvmkmf and the error message here. Thansk for any
suggestion in advance!!
/** CIN source file
*/
#include "extcode.h"
#include <comedilib.h>
#include <stdio.h>
comedi_t *device;
CIN MgErr CINRun(LStrHandle ComediDevice, int32 *var2);
CIN MgErr CINRun(LStrHandle ComediDevice, int32 *var2) {
device = comedi_open(LStrBuf(*ComediDevice));
*var2 = (int) device;
return noErr;
}
The error message from make:
gcc -I/usr/local/lv71/cintools -fPIC -O -c -o ComediOpen.o ComediOpen.c
gcc -shared -O ComediOpen.tmp /usr/local/lv71/cintools/cin.o ComediOpen.o
/usr/local/lv71/cintools/libcin.a
/usr/local/lv71/cintools/lvsbutil -c ComediOpen -t -CIN -d "'pwd'"
/root/ComediVIs/lowlevelCIN/open/ComediOpen.tmp undefined symbol:comedi_open
/usr/local/lv71/cintools/lvsbutil:error building resources file :1
make:***[ComediOpen.lsd] Error 2
The Makefile
#
# This Makefile was generated automatically by lvmkmf.
#
CC=gcc
LD=gcc
LDFLAGS=-shared
XFLAGS=-fPIC -O
CINDIR=/usr/local/lv71/cintools
CFLAGS=-I$(CINDIR) $(XFLAGS)
CINLIB=$(CINDIR)/libcin.a
MAKEGLUE=$(CINDIR)/makeglueLinux.awk
AS=gcc -fPIC -c
.SUFFIXES: .lsb .lsb~ $(SUFFIXES)
# Default rule to create an lsb from a C source file
.c.lsb: ; make $*.o
$(LD) $(LDFLAGS) -o $*.tmp \
$(CINDIR)/cin.o $(XLDFLAGS) $*.o $(CINLIB)
$(CINDIR)/lvsbutil -c $* -t CIN -d "`pwd`"
_at_rm -f $*.tmp
ComediOpen.lsb: ComediOpen.o
$(LD) $(LDFLAGS) -o ComediOpen.tmp \
$(CINDIR)/cin.o $(XLDFLAGS) ComediOpen.o $(CINLIB)
$(CINDIR)/lvsbutil -c ComediOpen -t CIN -d "`pwd`"
_at_rm -f ComediOpen.tmp
clean:
$(RM) -f ComediOpen.o ComediOpen.tmp
spotless: clean
$(RM) -f ComediOpen.lsb
Received on 2004-08-18Z03:41:06