Home→Forums→MonoBrick EV3 Firmware→Xamarin studio F#
- This topic has 3 replies, 2 voices, and was last updated 9 years, 9 months ago by Anders Søborg.
-
AuthorPosts
-
February 18, 2015 at 14:44 #5258
mtj_tjParticipantHey everyone
I’m trying to create a program for the MonoBrick Firmware using F#.
I want to be able to debug the program, should any exceptions occur and I’m therefore using Xamarin Studio with the Add-In.
C# compilation and connection over WiFi works fine, but I cannot compile my F# programs when using Mono, it works fine when using .NET but then I can’t use the MonoBrick Add-In and thus have no debugging.
I have created a new Solution using the MonoBrick Project and then added a new F# project to the solution.Does anyone have any experience with F# in Xamarin? I already have the F# Language Binding Add-in.
I do not have another choice concerning programming language.My code is as simple as this:
open MonoBrickFirmware.Display [<EntryPoint>] let main argv = LcdConsole.WriteLine("Test") printfn "%A" argv 0 // return an integer exit code
And this is my stacktrace when using Mono:
Building: ftester (Debug|x86) Performing main compilation... C:\Program Files (x86)\Mono\bin\fsharpc --noframework --nologo --target:exe --out:"C:\Users\XXX\Documents\Projects\monotest\ftester\bin\Debug\ftester.exe" --noframework --define:DEBUG --debug+ --optimize- --tailcalls- -r:"C:\Program Files (x86)\Mono\lib\mono\4.0\FSharp.Core.dll" -r:"C:\Program Files (x86)\Mono\lib\mono\4.0\System.Core.dll" -r:"C:\Program Files (x86)\Mono\lib\mono\4.0\System.dll" -r:"C:\Program Files (x86)\Mono\lib\mono\4.0\mscorlib.dll" -r:"C:\Users\XXX\Documents\Projects\monotest\monotest\MonoBrickFirmware.dll" "C:\Users\XXX\Documents\Projects\monotest\ftester\AssemblyInfo.fs" "C:\Users\XXX\Documents\Projects\monotest\ftester\Program.fs" ---------------------- Done ---------------------- Build failed. The specified executable is not a valid application for this OS platform. Build: 1 error, 0 warnings
The PC is running Windows 7 x64
February 19, 2015 at 21:39 #5261
Anders SøborgKeymasterHi there
I just merged this pull request to the master branch. I will create a new version of the add-in and upload it to my FTP server this weekend. In the meantime I think that what you are experiencing is related to the missing DLL. You have to add the DLL using gacutil. This will be included in the next image release.
/Anders
February 23, 2015 at 11:20 #5268
mtj_tjParticipantHey Anders
Thanks a lot, I’ll wait patiently for the new Add-In 🙂
I tried adding the DLL using gacutil after giving it a strong name, afterwards I added it to the project by browsing “C:\Windows\Microsoft.NET\assembly\GAC_MSIL\MonoBrickFirmware”, but I had no luck getting it to work.Kind regards.
February 24, 2015 at 19:09 #5270
Anders SøborgKeymaster -
AuthorPosts
You must be logged in to reply to this topic.
Follow