oxyplot / oxyplot-gtksharp

MIT License
7 stars 7 forks source link

GtkSharp3Demo not working #3

Open objorke opened 6 years ago

mennodeij commented 6 years ago

The problems seems to be that both GtkSharpDemo and GtkSharpDemo3 write their binaries and dependencies to the same folder. This then includes gtk-sharp.dll etc.

When Demo3 is running after Demo has been built, it can't load the correct version of gtk-sharp.dll and vice versa. The solution is, I think, to split the two demo projects into their own folders. The same applies for OxyPlot.GtkSharp and OxyPlot.GtkSharp3. These now share the same packages.config file, whereas OxyPlot.GtkSharp3 needs the gtk-sharp-3 nuget package and OxyPlot.GtkSharp does not.

I'm happy to refactor this and create a pull request.

mennodeij commented 6 years ago

The PR addresses this issue. Note that there is no support for gtksharp3 on Windows.

objorke commented 6 years ago

I tried to run the gtk#3 examples on OSX, but get a libgtk-3.0.dylib exception - does this mean that GTK3 is not installed? What is the simplest way to test the gtk#3 demos?

objorke commented 6 years ago

Can the gtk#3 demos only be built for x86?

mennodeij commented 6 years ago

I don't know what is the exact cause of the dylib exception, but I don't think that it is an x86/x64 issue. My approach would be

  1. find out if libgtk-3.0.dylib is on your system and in the LD_LIBRARY_PATH variable
  2. if not installed, follow the instructions here http://macappstore.org/gtk3/ to install first Homebrew, then gtk+3 and try again 2a. if missing from LD_LIBRARY_PATH configure the environment variable properly.
  3. with gtk+3 installed and LD_LIBRARY_PATH configured, there could also be an assembly redirect error, see the *.config files that come with the gtk-sharp-3 package.

Other than that I would not know.