FSharp.Charting.Gtk crashes on startup

I am new to F # and am trying to get my code to run on Mac. I am using Visual Studio (Xamarin) and used NuGet to install FSharp.Charting.Gtk. I also installed Gtk3 using macports.

When I try to run this simple code:

open FSharp.Charting    

[<EntryPoint>]
let main argv = 
    Chart.Line([ for i in 1 .. 10 -> i, i * i ]).ShowChart()

      

It compiles but just crashes on startup with this long error: https://pastebin.com/4n8jBMi5

Does anyone know what I am doing wrong? Many thanks

+3


source to share


1 answer


The README in the FSharp.Charting refactor says that on Windows you need to have Gtk # version 2.12.26 installed. I noticed that you said you have Gtk3 installed via MacPorts, but you have Gtk2 installed? As far as I know, the Gtk2 and Gtk3 APIs are not 100% compatible, so there is a major issue with the version number. So if the FSharp.Charting code uses the Gtk2 API, but you just installed Gtk3, that might be the reason. (I don't have a Mac, so I can't easily test this for myself).



+2


source







All Articles