I'm just getting started in writing a C# application on Windows to interface with the GPIO of a Raspberry PI. I've used the PigPIO library in the past with Python to make a remote connection with the RPI and manipulate the GPIO. I'm trying to do the same thing with a C# forms application, but having trouble understanding how to integrate the raw .C code with the C# application.
I found the PigPIO-dotnet wrapper written in C# that creates API's to interface to the .C Code. It looks like it would work great if I was running my app under Linux but under Windows I'm getting an error at runtime for "Unable to load DLL file 'libpigpio.so'". I'm assuming that because Windows uses .dll instead of .so libraries?
The Constants.cs file of PigPIO-dotnet starts out by referencing "libpigpio.so"
internal static class Constants
{
internal const string PiGpioLibrary = "libpigpio.so";
internal static readonly int[] HardwareClockPins0 = new[] { 4, 20, 32, 34 };
internal static readonly int[] HardwareClockPins2 = new[] { 6, 43 };
internal static readonly Dictionary<ResultCode, string> ResultCodeMessages = new Dictionary<ResultCode, string>()
I know basically nothing about C, so that's where I'm getting stuck. I'm assuming that I need to recompile the C application as a .dll. I've wore Google out looking at different tutorials on compiling C applications to .dll. But nothing seems relevant to my question.
My question is...What is my next step if there is one? I know that it is not possible to convert a .so to a .dll, so are there any steps I can take to create my own?