It presumably means that GHashTable
is not completely defined in the headers you include. That is, there is likely a line in glib.h
or one of the files it includes that reads something like:
typedef struct GHashTable GHashTable;
The structure tag could be different without changing my argument. There must be something similar because otherwise you'd get a different message about GHashTable
not being recognized as a type name:
error: unknown type name 'GHashTable'
There is no extra information provided about the structure in <glib.h>
; you don't need to know it to use it. The API for the hash table functions probably deal with GHashTable *
values only, so you don't need to know what's inside, any more than you need to know what's inside a FILE *
to be able to use it in your code (though macroized functions such as getchar()
might need to know about the internals of FILE *
; maybe a better analogy is DIR *
, but that's a POSIX interface and not necessarily as well known).
It means you will need to use:
GHashTable *htbls[3];
You can have arrays of pointers to incomplete types without problem.