02-01-2005, 12:35 AM
Yeah, i found that when trying Glade myself yesterday, stupid LD -export directive needs a white-space between each item, the fix is on CVS, you will have to compile the compiler yourself, sorry.. a new release may take time to be done..
That will work when the fix is used.
Code:
option explicit
#include "gtk.bi"
#include "glade-xml.bi"
sub on_window1_destroy cdecl alias "on_window1_destroy" (byval object as GtkObject ptr, byval user_data as gpointer ) export
gtk_main_quit()
end sub
sub on_button1_clicked cdecl alias "on_button1_clicked" (byval object as GtkObject ptr, byval user_data as gpointer ) export
gtk_main_quit()
end sub
dim xml as GladeXML ptr
gtk_init( NULL, NULL )
xml = glade_xml_new( "test.xml", NULL, NULL )
dim toplevel as GtkWidget ptr
toplevel = glade_xml_get_widget( xml, "window1" )
gtk_widget_show_all( toplevel )
g_signal_connect( toplevel, "delete-event", @gtk_main_quit, NULL )
glade_xml_signal_autoconnect( xml )
gtk_main( )
'g_object_unref( xml )
end 0
That will work when the fix is used.
ew FreeBASIC forums: http://www.freebasic.net/forum/index.php