WiringPi.Net
WiringPi.Net copied to clipboard
symbol lookup error for libwiringPi.so
Hi there, thank you for the work on this library, I hope you can help me with this issue..
I'm trying to let a simple blink example run, but when executing with mono on my raspi I just get the following error: "mono: symbol lookup error: /home/pi/Programs/GPIO-WrapperClass-Test/libwiringPi.so: undefined symbol: softPwmStop" I installed the latest version of wiringPi, it shows: "gpio version: 2.44" All the three ".so"-files are in my program directory. My program "LoopTest.cs" just looks like:
`using System; using System.Collections.Generic; using System.Linq; using System.Text; using WiringPi;
namespace SPITest
{
class LoopTest
{
//Main entry point
public static int Main(string[] args)
{
//Init WiringPi library
Init.WiringPiSetup();
//Set Pin 7 as Output
GPIO.pinMode(7, (int)GPIO.GPIOpinmode.Output);
for (int i = 0; i < 10; i++)
{
GPIO.digitalWrite(7, 1);
System.Threading.Thread.Sleep(1000);
Console.WriteLine("High");
GPIO.digitalWrite(7, 0);
System.Threading.Thread.Sleep(1000);
Console.WriteLine("Low");
}
return 0;
}
}
}`
I just don't get what I did wrong.. Thank you in advance for any help!!
You can't run the program on your PC, only on the Pi. Choose "Build" on the PC then copy all the files from the bin directory to the Pi and use "mono myprog.exe" to run them. You won't see the .so in your bin directory and in fact once you create the .so (just the first one, the rest aren't required any more) you don't need to copy it anywhere, a .dll will be generated in the bin directory.
I cheated and created a share on the pi and that's where the whole solution resides. I load into VS from there so I don't have to keep copying files over. If you use MonoRemoteDebugger you can even do some runtime debugging. Be warned that the remote debugger doesn't report build errors so build normally first them start the remote debug.