Re: GdkPixbuf-WARNING:cannot open pixbuf loader module file(on Windows)
- From: LRN <lrn1986 gmail com>
- To: gtk-list gnome org
- Subject: Re: GdkPixbuf-WARNING:cannot open pixbuf loader module file(on Windows)
- Date: Thu, 31 Dec 2009 17:03:29 +0300
On 31.12.2009 16:42, Todong Ma wrote:
> LRN wrote:
>> 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.
>> _______________________________________________
>> gtk-list mailing list
>> gtk-list gnome org
>> http://mail.gnome.org/mailman/listinfo/gtk-list
>>
>>
> I installed GTK to Desktop,but I put GTK related dll files into
> c:\windows\system32
> _______________________________________________
> gtk-list mailing list
> gtk-list gnome org
> http://mail.gnome.org/mailman/listinfo/gtk-list
Normal way of installing GTK+ on Windows is to put it *somewhere* as-is
(that is, with all /bin, /etc, /lib and other subdirectories residing in
one directory) and add /bin subdirectory to system PATH.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]