Code: Select all
using System;
using Phidget22;
namespace ConsoleApplication
{
class Program
{
private static void Rfid0_Tag(object sender, Phidget22.Events.RFIDTagEventArgs e)
{
Console.WriteLine("Tag: " + e.Tag);
Console.WriteLine("Protocol: " + e.Protocol);
Console.WriteLine("----------");
}
private static void Rfid0_TagLost(object sender, Phidget22.Events.RFIDTagLostEventArgs e)
{
Console.WriteLine("Tag: " + e.Tag);
Console.WriteLine("Protocol: " + e.Protocol);
Console.WriteLine("----------");
}
static void Main(string[] args)
{
RFID rfid0 = new RFID();
rfid0.Tag += Rfid0_Tag;
rfid0.TagLost += Rfid0_TagLost;
rfid0.Open(5000);
//Wait until Enter has been pressed before exiting
Console.ReadLine();
rfid0.Close();
}
}
}
I created the project folder, and uploaded the main.cs and a copy of Phidget22.***.dll from net46
then I compiled the program with the command
Code: Select all
mcs main.cs -r:Phidget22.***.dll
Unhandled Exception:
System.DllNotFoundException: phidget22 assembly:<unknown assembly> type:<unknown type> member:(null)
at (wrapper managed-to-native) Phidget22.Phidget22Imports.PhidgetRFID_create(intptr&)
at Phidget22.RFID..ctor () [0x00006] in <2a14baf30be24c0890d1479431891150>:0
at ConsoleApplication.Program.Main (System.String[] args) [0x00000] in <8a885098fb564fbf92c56e046a36c2d5>:0
[ERROR] FATAL UNHANDLED EXCEPTION: System.DllNotFoundException: phidget22 assembly:<unknown assembly> type:<unknown type> member:(null)
at (wrapper managed-to-native) Phidget22.Phidget22Imports.PhidgetRFID_create(intptr&)
at Phidget22.RFID..ctor () [0x00006] in <2a14baf30be24c0890d1479431891150>:0
at ConsoleApplication.Program.Main (System.String[] args) [0x00000] in <8a885098fb564fbf92c56e046a36c2d5>:0
Am I missing something or doing something wrong? I am a C# windows user, linux and mono are outside my comfort zone