problems with WinXP, Dev-Cpp and GTK+



I'm having problems linking even the simplest of programs using the latest Dev-Cpp (4.9.8.9), and
the GTK+2.0 on Windows XP -- either the binaries out there are corrupt, or my system is not picking
the right libraries when in tries to link.   
The program in question is just 
        
    #include <gtk/gtk.h>

    int main(int argc, char *argv[])
    {
        GtkWidget *window;

        gtk_init(&argc, &argv);
        window = gtk_window_new(GTK_WINDOW_TOPLEVEL);
        g_signal_connect(G_OBJECT(window), "destroy",
                        G_CALLBACK(gtk_main_quit), NULL);
        gtk_widget_show(window);
        gtk_main();
        return 0;
    }

The compile line that Dev-Cpp builds is
    g++.exe -c main1.c -o main1.o -I"C:/Dev-Cpp/include" -mms-bitfields
     -IC:/GTK/include/gtk-2.0 -IC:/GTK/lib/gtk-2.0/include -IC:/GTK/include/atk-1.0
     -IC:/GTK/include/pango-1.0 -IC:/GTK/include/glib-2.0
     -IC:/GTK/lib/glib-2.0/include  

    g++.exe main1.o  -o "Project1.exe" -L"C:/Dev-Cpp/lib" -mwindows 
    ../lib/iconv.lib -LC:/GTK/lib -lgtk-win32-2.0 -lgdk-win32-2.0 -latk-1.0
     -lgdk_pixbuf-2.0 -lpangowin32-1.0 -lgdi32 -lpango-1.0 -lgobject-2.0
     -lgmodule-2.0 -lglib-2.0 -lintl -liconv  

    main1.o(.text+0x3b):main1.c: undefined reference to `gtk_init_abi_check'
    main1.o(.text+0x48):main1.c: undefined reference to `gtk_window_new'
    main1.o(.text+0x5c):main1.c: undefined reference to `gtk_main_quit'
    main1.o(.text+0x6e):main1.c: undefined reference to `g_type_check_instance_cast'
    main1.o(.text+0x77):main1.c: undefined reference to `g_signal_connect_data'
    main1.o(.text+0x85):main1.c: undefined reference to `gtk_widget_show'
    main1.o(.text+0x8d):main1.c: undefined reference to `gtk_main'

If someone out there has successfully compiled a GTK+2.0 program using Dev-Cpp on WinXP,
 can you please tell me which version of the binaries you are using (and where I can get them).

Thanks
Zvi



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]