Page 1 of 1

Problem executing C# (Mono) on MAC - any help?

Posted: Wed May 30, 2018 12:52 pm
by t00cg
hi there,

i try to run phidget with mono c# on mac (same things runs seamless on windows).

i get the following error (compiling no problems):

Code: Select all

ixistenz-3:PhidgetVINTest t00cg$ mcs TestExample.cs -r:Phidget22.NET.dll
ixistenz-3:PhidgetVINTest t00cg$ mono TestExample.exe 
MainStarted

Unhandled Exception:
System.DllNotFoundException: phidget22
  at (wrapper managed-to-native) Phidget22.Phidget22Imports.PhidgetRCServo_create(intptr&)
  at Phidget22.RCServo..ctor () [0x00006] in <9883058a4b9e403fb0e5b60d727b9ce8>:0 
  at TestExample..ctor () [0x0000d] in <4933d4ae9f524d6fa942d31707374b69>:0 
  at TestExample.Main (System.String[] args) [0x0000a] in <4933d4ae9f524d6fa942d31707374b69>:0 
[ERROR] FATAL UNHANDLED EXCEPTION: System.DllNotFoundException: phidget22
  at (wrapper managed-to-native) Phidget22.Phidget22Imports.PhidgetRCServo_create(intptr&)
  at Phidget22.RCServo..ctor () [0x00006] in <9883058a4b9e403fb0e5b60d727b9ce8>:0 
  at TestExample..ctor () [0x0000d] in <4933d4ae9f524d6fa942d31707374b69>:0 
  at TestExample.Main (System.String[] args) [0x0000a] in <4933d4ae9f524d6fa942d31707374b69>:0 
ixistenz-3:PhidgetVINTest t00cg$ 
an someone tell me how to make this working?

thanks for any help

t00cg

Re: Problem executing C# (Mono) on MAC - any help?

Posted: Thu May 31, 2018 10:05 am
by Patrick

Re: Problem executing C# (Mono) on MAC - any help?

Posted: Thu May 31, 2018 3:00 pm
by t00cg
i tried a lot of things but this script on the phidgets.com site (your link - https://www.phidgets.com/docs/Language_-_C_Sharp#macOS, example for mac os x) is not working at all. there is even another error (missing some manager).

at the moment, i doubt it is working at all with .net today.

and i hope someone can show me, that it works.

Re: Problem executing C# (Mono) on MAC - any help?

Posted: Sun Aug 22, 2021 6:17 am
by MeanDude
You know, I have the exact same problem. I can get all things Phidget to work on a PC, but when I try it with my Mac, it's throwing the DLL not found error. I have followed the instructions, included the DLL and configs in my projects directory, have set them up as content for my build, etc... then compiled using

Code: Select all

mcs Program.cs -r:Phidget22. NET .dll 
... (minus the spaces - forums thought it was a URL) and tried

Code: Select all

Mono Program.exe 
... to run my program. It didn't work. Instead, I get this:

Code: Select all

System.DllNotFoundException: phidget22 assembly:<unknown assembly> type:<unknown type> member:(null)
  at (wrapper managed-to-native) Phidget22.Phidget22Imports.PhidgetDigitalInput_create(intptr&)
  at Phidget22.DigitalInput..ctor () [0x00006] in <021ac197938e481caa36f498e5280f59>:0 
  at PhidgetX.MainClass.Main (System.String[] args) [0x00000] in <2d89ac92aea94efda1d148b0a4d36201>:0 
[ERROR] FATAL UNHANDLED EXCEPTION: System.DllNotFoundException: phidget22 assembly:<unknown assembly> type:<unknown type> member:(null)
  at (wrapper managed-to-native) Phidget22.Phidget22Imports.PhidgetDigitalInput_create(intptr&)
  at Phidget22.DigitalInput..ctor () [0x00006] in <021ac197938e481caa36f498e5280f59>:0 
  at PhidgetX.MainClass.Main (System.String[] args) [0x00000] in <2d89ac92aea94efda1d148b0a4d36201>:0 
Hey Phidget folks - what are we all missing? It has gotta be something we're missing, right?

- Me

Re: Problem executing C# (Mono) on MAC - any help?

Posted: Tue Aug 24, 2021 11:26 am
by Patrick
For macOS, have you installed the macOS phidget22 libraries? It looks like that .NET library can't find the phidget22 C library.

-Patrick