[Gtk-sharp-list] Gtk# on Windows OK for me now!
chris at lee-gertner.net
Thu Apr 19 17:36:30 EDT 2007
After clearing the Windows GAC of some leftovers from an experimental
Gtk# install (by manual rm -rf in appropriate directories, because more
sane(?) methods via Windows Explorer didn't work), and re-installing
Paco's Gtk# dist for Windows, the errors about not locating different
assemblies went away. I was about to build and (sort of) run my test
program. The program crashes on MS .Net with some casting errors in gtk
unmanaged code, but assemblies are now at least found.
Then, I tried building and running with Mono, and the program ran fine.
I don't know what I did to get it working, but it worked. Then, I
replaced NPlot with my new custom graph widget it my original big hairy
program, compiled it with gmcs on Windows, and it runs fine on
Windows!!! I don't know what changes in the end made things work, but
it is now working. This app is doing multiple threads, updated charts
from data parsed out of UDP packets, multiple windows, using anonymous
delegates, using generics, etc.... and it is all working just like it
did in Linux (knock on wood!).
I feel I should post that since I've left a train of scary problem
emails on the public email list.... My advice for someone trying to
build a cross platform app using Mono/Gtk# is to test it on all
platforms from the start. This seems obvious in hind-sight, but I had
gotten away with not doing this with Gtk/C programs a couple times, so I
wasn't paranoid enough when trying Mono.
Thanks to everyone working on Mono/Gtk#!!!
On Thu, 2007-04-19 at 12:07 -0400, Chris Lee wrote:
> A followup:
> On Linux, I recompiled with mcs instead of gmcs, used gtk-sharp-1.0.
> Runs OK on Linux, but crashes in the same place in Windows (in unmanaged
> code, in show-all).
> On Windows, I installed Gtk# for .Net using Paco's installer (from
> Novell Forge), and recompiled the code in MS .Net 2003. When I run, I
> get an error about not being able to find the pango-sharp (or a
> dependency) when the code first tries to get a pango-context. I
> recompiled using .Net 2003 and Gtk#-2, and I get an error about not
> being able to find gtk-sharp (or a dependency). I re-ran the script in
> the Gtk# for .Net directory that adds things to the GAC, but it didn't
> gacco -q "pango-sharp"
> reports a location for pango-sharp.dll which seems OK (it has the dll
> and a file __AssemblyInfo__.ini).
> I'm not sure what else I can do....
> On Wed, 2007-04-18 at 18:04 -0400, Chris Lee wrote:
> > I'm now trying to get a smaller program running with Gtk# on windows, a
> > simple graphing widget (I was using NPlot-gtk-0.9.9.2, but it wasn't
> > working on Windows due to calls to gdk_x11_*). I'm trying to do very
> > simple stuff, and for now compiling with mono-1.2.3 on linux using gtk#
> > 1.0 and then running the .exe with mono-1.2.3 on windows.
> > I'm getting a crash in unmanaged call gtk_widget_show_all() right after
> > I make my widgets, when I call ShowAll on my top-level window, before
> > the program gets to Application.Run().
> > I'm using no threads now, but I am compiling with gmcs. I'm using .Net
> > 2.0 only for the generics.
> > Is using gmcs my problem? Is this not yet stable with Gtk# on windows?
> Gtk-sharp-list maillist - Gtk-sharp-list at lists.ximian.com
More information about the Gtk-sharp-list