Open jmchapman opened 10 years ago
There is some inconsistency between script resolution rules on Mono and .NET. Could you try opening FSharp.Charting.Gtk.0.90.7/FSharp.Charting.Gtk.fsx
, sending the whole lot to FSI and then going back to your chart file and sending that without the initial #load
?
This is not a good workaround, but I want to check that it works ok in that case.
Doing that gives you:
> Chart.Line [ for x in 0 .. 10 -> x, x*x ];;
val it : ChartTypes.GenericChart =
Error: An exception was thrown by the type initializer for Gtk.Widget
Problem still persists - been trying everything, can't get it to run, hanging on mono-sgen
The Gtk.Widget issue looks like a duplicate of issue #29
I have mono 3.8, I am running F# interactive from within emacs on OS X mavericks.
I downloaded FSharp.Charting.Gtk.0.90.7 from nuget. I put it in ~/Desktop/packages/. I have a script containing the following at ~/Desktop/test.fsx:
load "packages/FSharp.Charting.Gtk.0.90.7/FSharp.Charting.Gtk.fsx"
open FSharp.Charting Chart.Line [ for x in 0 .. 10 -> x, x*x ]
Trying to run the three lines above gives the following error:
"> [Loading /Users/james/Desktop/packages/FSharp.Charting.Gtk.0.90.7/FSharp.Charting.Gtk.fsx]
/Users/james/Desktop/packages/FSharp.Charting.Gtk.0.90.7/FSharp.Charting.Gtk.fsx(28,1): warning FS0211: The search directory '/usr/lib/mono/gtk-sharp-2.0' could not be found 2014-09-05 12:49:13.471 mono[7211:d07] *\ WARNING: Method userSpaceScaleFactor in class NSView is deprecated on 10.7 and later. It should not be used in new applications. Use convertRectToBacking: instead.
namespace FSI_0002.FSharp.Charting val verifyMac : unit -> bool val isMac : bool module FsiAutoShow = begin end
/Users/james/Desktop/stdin(0,1): error FS0078: Unable to find the file 'OxyPlot.dll' in any of /Library/Frameworks/Mono.framework/Versions/3.8.0/lib/mono/4.5 /Library/Frameworks/Mono.framework/Versions/Current/lib/mono/gtk-sharp-2.0 /Users/james/Desktop/packages/FSharp.Charting.Gtk.0.90.7/. /Users/james/Desktop/ /Library/Frameworks/Mono.framework/Versions/3.8.0/lib/mono/4.0/ Stopped due to error"
I created symbolic links to OxyPlot.dll and OxyPlot.GtkSharp.dll in /Users/james/Desktop/packages/FSharp.Charting.Gtk.0.90.7/. I then get the following error and and a something called mono-sgen appeared in my dock:
"> [Loading /Users/james/Desktop/packages/FSharp.Charting.Gtk.0.90.7/FSharp.Charting.Gtk.fsx]
/Users/james/Desktop/packages/FSharp.Charting.Gtk.0.90.7/FSharp.Charting.Gtk.fsx(28,1): warning FS0211: The search directory '/usr/lib/mono/gtk-sharp-2.0' could not be found 2014-09-05 14:24:36.773 mono[7551:d07] *\ WARNING: Method userSpaceScaleFactor in class NSView is deprecated on 10.7 and later. It should not be used in new applications. Use convertRectToBacking: instead.
namespace FSI_0002.FSharp.Charting val verifyMac : unit -> bool val isMac : bool module FsiAutoShow = begin end
Binding session to '/Users/james/Desktop/packages/FSharp.Charting.Gtk.0.90.7/./OxyPlot.dll'... Binding session to '/Users/james/Desktop/packages/FSharp.Charting.Gtk.0.90.7/./OxyPlot.GtkSharp.dll'...
val it : FSharp.Charting.ChartTypes.GenericChart = Error: An exception was thrown by the type initializer for Gtk.Widget