LibUsbDotNet (OSX; Xamarin; Mono; C#)

fmendesfmendes PTMember

Hi all,
this problem is probably more related with mono than Xamarin but generaly I need to know how to use a .NET dll onto Xamarin using Mono on OS X.
I've done the documentation research, but the problem is to complex to me to fill the gaps and understand what to do.

What?
I'm trying to use LibUsbDotNet with in C# program.

I'm using:
OS X; Xamarin; Mono; C#; LibUsbDotNet

Problem:
I've run LibUsbDotNet examples on Xamarin but have this problem:
"libusb-1.0 library not found. This is often an indication that libusb-1.0 was installed to '/usr/local/lib' and mono.net is not looking for it there. To resolve this, add the path '/usr/local/lib' to '/etc/ld.so.conf' and run 'ldconfig' as root. (http://www.mono-project.com/DllNotFoundException)"

What I know:
$ ls -la /usr/local/lib
-rwxr-xr-x 1 root wheel 103260 22 Nov 2014 libusb-0.1.4.dylib
lrwxr-xr-x 1 fmendes admin 46 18 Jun 00:56 libusb-1.0.0.dylib -> ../Cellar/libusb/1.0.19/lib/libusb-1.0.0.dylib
lrwxr-xr-x 1 fmendes admin 40 18 Jun 00:56 libusb-1.0.a -> ../Cellar/libusb/1.0.19/lib/libusb-1.0.a
lrwxr-xr-x 1 fmendes admin 44 18 Jun 00:56 libusb-1.0.dylib -> ../Cellar/libusb/1.0.19/lib/libusb-1.0.dylib
-rw-r--r-- 1 root wheel 113088 22 Nov 2014 libusb.a
lrwxr-xr-x 1 root wheel 18 31 Ago 02:22 libusb.dylib -> libusb-0.1.4.dylib
-rwxr-xr-x 1 root wheel 912 22 Nov 2014 libusb.la
-rwxr-xr-x 1 root wheel 103888 22 Nov 2014 libusbpp-0.1.4.dylib
-rw-r--r-- 1 root wheel 103608 22 Nov 2014 libusbpp.a
lrwxr-xr-x 1 root wheel 20 31 Ago 02:22 libusbpp.dylib -> libusbpp-0.1.4.dylib
-rwxr-xr-x 1 root wheel 949 22 Nov 2014 libusbpp.la
drwxr-xr-x 4 fmendes admin 136 31 Ago 02:22 pkgconfig

What I don't know:
The documentation tells how to solve on Linux"...add the path '/usr/local/lib' to '/etc/ld.so.conf' and run 'ldconfig' as root...."
but I don't know how to do it on OS X...

thanks in advance
fmendes

Posts

  • summeysummey USUniversity ✭✭

    Have you had any luck with this?

  • Any luck with this??
    What is the alternative?

    Do I need to call C (LibUsb) from C# as a replacement of LibUsbDotNet???

  • devi.3128devi.3128 USMember

    Any luck with this.

    I am getting "libusb-1.0 library not found. This is often an indication that libusb-1.0 was installed to '/usr/local/lib' and mono.net is not looking for it there. To resolve this, add the path '/usr/local/lib' to '/etc/ld.so.conf' and run 'ldconfig' as root. in Xamarin-Mac.

Sign In or Register to comment.