Page 1 of 1

Really basic question (probably)

Posted: Mon Oct 05, 2020 5:30 pm
by temushin
So, I've written a simple c# program in visual studio (console app (.NET Core)). I have my SBC set up to work wirelessly, and everything works when I run it on my computer. I've followed the directions from here (https://www.phidgets.com/docs/OS_-_Phid ... C_and_Java), installed the C packages and full Debian Package Repository, and I have a .exe file installed on the SBC, but when I try to run it I get a format error: ./etc/webif/init.d/S20GaiaSBCLoac: 41: /etc/webif/init.d/S20GaiaSBCLocal: /usr/userapps/GaiaSBCLocal/GaiaSCBLocal.exe: Exec format error

Can someone tell me what I've done wrong? I'm sure it's really obvious, but... could you explain it to me as if I'm a microbiologist whose boss is making him learn to code and not a computer scientist?

Re: Really basic question (probably)

Posted: Tue Oct 06, 2020 11:30 am
by Patrick
Hi,

You will need to install Mono on the SBC to run #C programs there.

see: https://www.phidgets.com/docs/Language_ ... Linux_Mono

-Patrick

Re: Really basic question (probably)

Posted: Tue Oct 06, 2020 5:43 pm
by temushin
Thanks for that. I thought I had done that as part of updating the packages, but apparently I hadn't. Now that I have done that, it's changed the error message, so that's progress:

run-detectors: unable to find an interpreter for /usr/userapps/GaiaSBCLocal/GaiaSCBLocal.exe

Re: Really basic question (probably)

Posted: Wed Oct 07, 2020 3:01 pm
by Patrick
Hi,

I'm not that familiar with .NET core - maybe you need to install .net core instead of mono? Maybe you need to target .NET standard when you compile? Maybe you should compile with Mono?

-Patrick