<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 TRANSITIONAL//EN">
<HTML>
<HEAD>
  <META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=UTF-8">
  <META NAME="GENERATOR" CONTENT="GtkHTML/3.18.2">
</HEAD>
<BODY>
Hi!<BR>
<BR>
I would like to know how to compile GTK dynamic libraries for win32 for creating C# bindings.<BR>
On linux I compile the library for a Gtk widget I wrote on C, than I create the bindings with the gapi tools and all works fine. Instead,on windows, I compile the library, I use the bindings I created before and all works if I don't connect any of the 3 signals sended by my GTK widget. But if I add any handler to the widget events (this.timescale1.InChanged += new LongoMatch.InChangedHandler(this.OnStartValueChanged);), and a the signal &quot;in_changed&quot; is sent, my app finishes without any info.<BR>
<BR>
Running &quot;mono test.exe&quot; I get a System.AccesViolationException : Trying&nbsp; to read or write in the protected memory.<BR>
<BR>
Running &quot;mono -v test.exe&quot; the output is more interesting, as we can see the signal is caught and processed and that the aplication is deading in the callback method (OnChanged())<BR>
<BR>
Method (wrapper managed-to-native) System.Object:__icall_wrapper_mono_delegate_ctor (object,object,intptr) emitted at 00F71DC0 to 00F71E06 (code length 70) [test.exe]<BR>
Method LongoMatch.GtkTimescale : add_InChanged(LongoMatch.InChangedHandler) emitted at 00F71E20 to 00F71E74 (code length 84) [test.exe]<BR>
Method (wrapper native-to-managed) LongoMatch.GtkTimescale:InChangedSignalCallback (intptr,double,intptr) emitted at 00F71E78 to 00F71EE8 (code length 112) [test.exe]<BR>
Method Gtk.Application:Run () emitted at 00F71EF8 to 00F71F02 (code length 10) [test.exe]<BR>
Method (wrapper managed-to-native) Gtk.Application:gtk_main () emitted at 00F71F10 to 00F71F4D (code length 61) [test.exe]<BR>
Method LongoMatch.GtkTimescale:InChangedSignalCallback(intptr,double,intptr) emitted at 00F71F50 to 00F720E5 (code length 405) [test.exe]<BR>
Method LongoMatch.InChangedArgs:.ctor () emitted at 00F72128 to 00F72136 (code length 14) [test.exe]<BR>
Method GLib.SignalArgs:.ctor () emitted at 00F72148 to 00F7216A (code length 34)[test.exe]<BR>
Method System.EventArgs:.ctor () emitted at 00F72178 to 00F7217D (code length 5)[test.exe]<BR>
Method System.EventArgs:.cctor () emitted at 00F72180 to 00F721A5 (code length 37) [test.exe]<BR>
Method GLib.SignalArgs:set_Args (object[]) emitted at 00F721A8 to 00F721B6 (codelength 14) [test.exe]<BR>
Method GLib.SignalArgs:get_Args () emitted at 00F721B8 to 00F721CC (code length20) [test.exe]<BR>
Method GLib.Signal:get_Handler () emitted at 00F721D0 to 00F7226C (code length 156) [test.exe]<BR>
Method (wrapper managed-to-native) GLib.Signal:g_signal_get_invocation_hint (intptr) emitted at 00F72288 to 00F722CF (code length 71) [test.exe]<BR>
Method (wrapper managed-to-native) System.Runtime.InteropServices.Marshal:PtrToStructure (intptr,System.Type) emitted at 00F722D0 to 00F72316 (code length 70) [test.exe]<BR>
Method (wrapper runtime-invoke) GLib.InvocationHint:runtime_invoke_void_intptr_object (object,intptr,intptr,intptr) emitted at 00F72318 to 00F723B2 (code length154) [test.exe]<BR>
Method (wrapper unknown) GLib.InvocationHint:PtrToStructure (intptr,object) emitted at 00F723B8 to 00F72449 (code length 145) [test.exe]<BR>
Method GLib.Object:GetObject (intptr) emitted at 00F72450 to 00F7246B (code length 27) [test.exe]<BR>
Method GLib.Object:GetObject (intptr,bool) emitted at 00F72478 to 00F725C5 (codelength 333) [test.exe]<BR>
Method System.Collections.Hashtable:KeyEquals (object,object) emitted at 00F72608 to 00F7267E (code length 118) [test.exe]<BR>
Method System.IntPtr:Equals (object) emitted at 00F72680 to 00F726FB (code length 123) [test.exe]<BR>
Method GLib.ToggleRef:get_IsAlive () emitted at 00F72710 to 00F72799 (code length 137) [test.exe]<BR>
Method GLib.ToggleRef:get_Target () emitted at 00F727A0 to 00F72848 (code length168) [test.exe]<BR>
Method test.MainWindow:onChanged (object,object) emitted at 00F72848 to 00F7284D(code length 5) [test.exe]<BR>
<BR>
Stacktrace:<BR>
at (wrapper managed-to-native) Gtk.Application.gtk_main () &lt;0x00004&gt;<BR>
at (wrapper managed-to-native) Gtk.Application.gtk_main () &lt;0xffffffff&gt;<BR>
at Gtk.Application.Run () &lt;0x00007&gt;<BR>
at test.MainWindow.Main (string[]) &lt;0x00021&gt;<BR>
at (wrapper runtime-invoke) test.MainWindow.runtime_invoke_void_string[] (object,intptr,intptr,intptr) &lt;0xffffffff&gt;<BR>
This application has requested the Runtime to terminate it in an unusual way.<BR>
Please contact the application's support team for more information.<BR>
C:\Documents and Settings\ubuntu\Mis documentos\Proyectos\LongoMatch\test\bin\Debug&gt;<BR>
<BR>
</BODY>
</HTML>