Page 1 of 1

.Net (Core) 6 on Linux

Posted: Thu Oct 27, 2022 3:47 pm
by cvboucher
Should the .Net Phidget libraries work on Linux? I've included the Phidget22.NET Nuget package in my project and ran the Linux install scripts on my device (Raspberry Pi). But I'm getting an exception:

Code: Select all

---> System.DllNotFoundException: Unable to load shared library 'phidget22' or one of its dependencies. In order to help diagnose loading problems, consider setting the LD_DEBUG environment variable: libphidget22: cannot open shared object file: No such file or directory
    at Phidget22.Phidget22Imports.PhidgetManager_create(IntPtr& phid)
    at Phidget22.Manager..ctor()
The Phidget libraries work great when I run my application on Windows. Also, my app runs fine on Linux if I don't make any calls to the Phidget libraries.

Thanks,
Craig

Re: .Net (Core) 6 on Linux

Posted: Mon Dec 05, 2022 9:33 am
by cvboucher
I got this working. In addition to the Phidgets library, I was using the Networking and Manager libraries. So I had to also install libphidget22extra and libphidget-dev.

Code: Select all

sudo apt-get install -y libusb-1.0-0-dev
curl -fsSL https://www.phidgets.com/downloads/setup_linux | sudo -E bash -
sudo apt-get install -y libphidget22
sudo apt-get install -y libphidget22-dev
sudo apt-get install -y libphidget22extra

Re: .Net (Core) 6 on Linux

Posted: Mon Dec 05, 2022 5:28 pm
by Patrick
libphidget22extra shouldn't be required - this is used by our network server, but not required for network clients.

libphidget22-dev is required for .NET to find the C library.

-Patrick