C
Charles Packer
In the code example below, why does the reference to
gdk_pixbuf_new_from_file in main compile okay, but
in subr2 gives the error "dereferencing pointer to
incomplete type"? A search through this newsgroup
suggests that the error arises when the proper
header files are missing, but when the header file I've
got is sufficient to compile one instance of the
call, but not the other, I don't know where to turn
next.
#include <gtk/gtk.h>
subr2 (GdkPixbuf *YY) {
*YY = gdk_pixbuf_new_from_file("somefile", NULL);
}
main(int argc, char *argv[]){
GdkPixbuf *XX = gdk_pixbuf_new_from_file("somefile", NULL);
}
The reason I'm coding this way is convenience (in code I'm
writing only for myself, incidentally). It seems to be a way
to set multiple variables with a single function call, as
in setimgpars(&nbands, &width, &height). Has worked fine
for integers...
gdk_pixbuf_new_from_file in main compile okay, but
in subr2 gives the error "dereferencing pointer to
incomplete type"? A search through this newsgroup
suggests that the error arises when the proper
header files are missing, but when the header file I've
got is sufficient to compile one instance of the
call, but not the other, I don't know where to turn
next.
#include <gtk/gtk.h>
subr2 (GdkPixbuf *YY) {
*YY = gdk_pixbuf_new_from_file("somefile", NULL);
}
main(int argc, char *argv[]){
GdkPixbuf *XX = gdk_pixbuf_new_from_file("somefile", NULL);
}
The reason I'm coding this way is convenience (in code I'm
writing only for myself, incidentally). It seems to be a way
to set multiple variables with a single function call, as
in setimgpars(&nbands, &width, &height). Has worked fine
for integers...