Re: [Vala] vala LibUSB : get_device_list



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



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]