Re: [Vala] vala LibUSB : get_device_list
- From: Geert Jordaens <geert jordaens telenet be>
- To: vala-list gnome org
- Subject: Re: [Vala] vala LibUSB : get_device_list
- Date: Mon, 27 Dec 2010 15:18:12 +0100
On 27-12-10 15:04, Dru Moore wrote:
On 27 December 2010 13:49, Geert Jordaens<geert jordaens telenet be> wrote:
hello,
any idea how to compile code below?
/* valac --pkg libusb-1.0 TestLibUsb.vala */
using LibUSB;
namespace TestLibUSb
{
public static class TestLibUSb
{
static int main (string[] args)
{
Context context = null;
Device[] devices = null;
Context.init (out context);
context.get_device_list(out devices);
return 0;
}
}
}
If the following (from the comments) doesn't work, assuming you have
saved the file as TestLibUsb.vala and are in that working directory):
valac --pkg libusb-1.0 TestLibUsb.vala
what output does it give? You may need to install libusb-1.0.0-dev to
get the headers etc.
dru
I have following components installed.
installed :
libusb1-devel-doc-1.0.8-3.fc15.noarch
libusb1-static-1.0.8-3.fc15.x86_64
libusb1-devel-1.0.8-3.fc15.x86_64
libusb1-1.0.8-3.fc15.x86_64
valac --version
Vala 0.11.2.73-6b38f-dirty
Output :
[geert obelix testlibusb]$ ls
TestLibUsb.vala
[geert obelix testlibusb]$ valac -v -g --pkg libusb-1.0 TestLibUsb.vala
Segmentation fault
[geert obelix testlibusb]$
Bug 638094 contains more info
Geert
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]