Re: Gdk-Pixbuf Problem


On Mon, 2002-08-26 at 20:05, anita setty wrote:
> Hello,
> I was able to compile gtk-2.0 on solaris and install
> it along with glib, atk and pango.
> I have installed the library in /usr/local/lib.
> Header's are installed in /usr/local/include.
> I am trying to use the function 
> gdk_pixbuf_xlib_get_from_drawable()
> which returns a GdkPixbuf. I have included the .h files. Have
> set complier flags to include appropriate header files. Have set
> the library to link.
> I am getting an error "The type _GdkPixbuf" is incomplete.
> When I looked into the gdk-pixbuf.h, I see that GdkPixbuf is
> typedef to structure _GdkPixbuf. This structure is not defined 
> in
> any files under /usr/local/include/gtk-2.0/gdk-pixbuf
> I see that this structure has been declared in 
> gdk-pixbuf-private.h
> and this file is not installed in 
> /usr/local/include/gtk-2.0/gdk-pixbuf
> Is this the reason I am getting compilation error, or I am doing 
> something wrong.
> Please let me know what I should do.
The GdkPixbuf *is* a private structure, so it's ok that the file is not
installed.  You reference a GdkPixbuf by its pointer, so you don't need
the actual structure layout.  How are you trying to use it?  Sounds like
you're trying to malloc() a GdkPixbuf or allocate it in the stack.  You
can't do these things.  A GdkPixbuf is a ref counted object, which you
create using functions like gdk_pixbuf_new().


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