Hi,
I am new to Linux and Free Pascal so please forgive me If I am asking a silly question :)
I have converted libglade headers to free pascal but I need to know how to include the dynamic symbol information for gtk event handler functions in the final ELF file.
For example; I compile the following C program:
#include <gtk/gtk.h>
#include <glade/glade.h>void on_window1_destroy(GtkWidget *widget, gpointer user_data) { /* do something useful here */
gtk_main_quit();}
int main(int argc, char *argv[]) {
GladeXML *xml;
gtk_init(&argc, &argv);
glade_gnome_init();
/* load the interface */
xml = glade_xml_new("test.glade", NULL);
/* connect the signals in the interface */
glade_xml_signal_autoconnect(xml);
/* start the event loop */
gtk_main();
return 0;
}Now if I use objdump -T on the generated ELF file, I can see the on_window1_destroy function is in the list.
But when I compile the pascal version it does not get into the dynamic symbol info table:
program test;
uses glib, gdk, gtk, glade;
var
TestXML : PGladeXML;
procedure on_window1_destroy (widget : PGtkWidget; data: Pgpointer); cdecl;
begin
gtk_main_quit();
end;
begin
gtk_init(@argc, @argv);
glade_init;
TestXML := glade_xml_new('test.glade', nil);
glade_xml_signal_autoconnect(TestXML);
gtk_main();
end.Because of this, glade_xml_signal_autoconnect function does not work properly in the pascal version.
Please help :)
Thanks in advance for the replies.
Ecmel Ercan
PS: I can manually attach the event handlers and Glade works great with FPC. If only I can auto-magically connect the event handlers, everything will be much more easy and clean.
