Re: GdkPixbuf-WARNING:cannot open pixbuf loader module file(on Windows)



On 31.12.2009 16:05, Todong Ma wrote:
> Hi,everyone.
>
> I want to write a program to display an image.
> This is my code:
>
> /#include <gtk/gtk.h>
>
> int main(int argc,char **argv){
>
>    gtk_init(&argc,&argv);
>
>    GtkWidget *window = gtk_window_new(GTK_WINDOW_TOPLEVEL);
>    GtkWidget *image = gtk_image_new_from_file("wxp.jpg");
>
>    gtk_container_add(GTK_CONTAINER(window),image);
>    gtk_window_resize(GTK_WINDOW(window),300,300);
>    gtk_widget_show_all(window);
>
>    gtk_main();
>
>    return 0;
>
> }
> /
>
> But after I ran the program, it only display a broken image icon.
>
> /wxp.jpg is at the same directory as my program,and this is the error
> message:
> (gtk_image.exe:1100): GdkPixbuf-WARNING **: Cannot open pixbuf loader
> module file 'C:\WINDOWS\system32\etc\gtk-2.0\gdk-pixbuf.loaders': No
> such file or directory
>
> (gtk_image.exe:1100): GdkPixbuf-WARNING **: Cannot open pixbuf loader
> module file 'C:\WINDOWS\system32\etc\gtk-2.0\gdk-pixbuf.loaders': No
> such file or directory
>
> (gtk_image.exe:1100): GdkPixbuf-WARNING **: Cannot open pixbuf loader
> module file 'C:\WINDOWS\system32\etc\gtk-2.0\gdk-pixbuf.loaders': No
> such file or directory/
>
> What should I do to display my image(wxp.jpg)?
>
> Any suggestion is appreciated.
> _______________________________________________
> gtk-list mailing list
> gtk-list gnome org
> http://mail.gnome.org/mailman/listinfo/gtk-list
Either you've installed GTK into c:\windows\system32 (which isn't nice),
or something is horribly wrong.


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