[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Lua and libusb on Raspberry Pi
- From: Robert Brown <rebrown@...>
- Date: Wed, 20 Aug 2014 21:04:43 +1000
Hi
I wish to run a couple of lua scripts written by a competent person (as
opposed to noob me) on a raspberry pi (kernel 3.10.25+) using a usb
connection from an Arduino shield. The scripts were originally written
to read data from the Arduino uart port and I want to read from the usb
port instead so I will need to do some hacking.
First step after installing lua was to get libusb installed.
I chose to use libusb-1.0.19 from
http://sourceforge.net/projects/libusb/files/latest/ which compiled ok
from a tar.gz file.
Then I did
cp /home/pi/libusb-1.0.19/libusb/.libs/libusb-1.0.so libusb.so
and then
sudo cp /home/pi/libusb-1.0.19/libusb.so /usr/local/lib/lua/5.1/
At this point I get an error when I run
lua
Lua 5.1.5 Copyright (C) 1994-2012 Lua.org, PUC-Rio
> require('libusb')
error loading module 'libusb' from file './libusb.so':
./libusb.so: undefined symbol: luaopen_libusb
stack traceback:
[C]: ?
[C]: in function 'require'
stdin:1: in main chunk
[C]: ?
Can anyone offer some advice on where I go from here?
Thanks