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

Supporting 10.7 and up
Post Reply
t00cg
Fresh meat
Posts: 3
Joined: Mon Oct 10, 2016 5:56 am
Contact:

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

Post 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
Attachments
errorInExecution.png
PhidgetVINTTest.zip
(75.84 KiB) Downloaded 704 times
User avatar
Patrick
Lead Developer
Posts: 3399
Joined: Mon Jun 20, 2005 8:46 am
Location: Canada
Contact:

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

Post by Patrick »

t00cg
Fresh meat
Posts: 3
Joined: Mon Oct 10, 2016 5:56 am
Contact:

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

Post 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.
MeanDude
Fresh meat
Posts: 2
Joined: Sun Aug 22, 2021 6:11 am
Contact:

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

Post 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
User avatar
Patrick
Lead Developer
Posts: 3399
Joined: Mon Jun 20, 2005 8:46 am
Location: Canada
Contact:

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

Post 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
Post Reply

Who is online

Users browsing this forum: No registered users and 5 guests