--=-bcpUnL2CQAXPjp6pa93o Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Ok, I solved the problem adding the file 'fcint.h' into my project. This is the best solution? At first I tryed to redefine FcConfig into the source code, but it required to define also all of the inner variables... So I dicided to include 'fcint.h' into the source code... Thanks again. Em Sex, 2004-01-02 às 12:16, Adriano Del Vigna de Almeida escreveu: > Hello folks, > > I'm having a strange error. When I try to access some internal > variable inside a FcConfig strucutre from a program I receive the > following error: > > gcc -I /usr/include/freetype2 `pkg-config --cflags glib-2.0` > -lfontconfig `pkg-config --libs glib-2.0` main.c fontsbase.c > fcconfighandlers.c -o fontman > main.c: In function `ListAllFonts': > main.c:328: error: dereferencing pointer to incomplete type > make: ** [all] Erro 1 > > /***** CODE SNIPET ******************************/ > > > FcConfig *Config = NULL; > FcFontSet *FontSet = NULL; > > FcPattern *Pattern = NULL; > FcObjectSet *ObjectSet = NULL; > FcChar8 *Family; > > unsigned int count; > > Config = FcInitLoadConfigAndAllFonts(); > if(Config == NULL) > { > puts("Error on creating a Fontconfig configuration!"); > return(0); > } > > FcConfigSetCurrent(Config); > > Pattern = FcPatternCreate(); > ObjectSet = FcObjectSetBuild(FC_FAMILY, 0); > FontSet = FcFontList(0, Pattern, ObjectSet); > > for(count = 0; count < FontSet->nfont; count++) > { > FcPatternGetString(FontSet->fonts[count], FC_FAMILY, 0, > &Family); > > /** I GOT AN ERROR AT THIS LINE!! > ****************************/ > if(FcStrSetMember(Config->disabledFonts, Family)) > /************************************************************/ > > printf("%s\t\t!!DISABLED!!\n", Family); > else > printf("%s\n", Family); > } > } > > /******* END *******************************/ > > By the way, disabledFonts is a FcStrSet variable inside FcConfig > structure. What I'm doing wrong? I have never seen this error > before... > > Thanks for the attention! > > -- > Adriano Del Vigna de Almeida <katmandu@xxxxxxxxx> --=-bcpUnL2CQAXPjp6pa93o Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: 7bit <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 TRANSITIONAL//EN"> <HTML> <HEAD> <META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=UTF-8"> <META NAME="GENERATOR" CONTENT="GtkHTML/3.0.9"> </HEAD> <BODY> Ok, I solved the problem adding the file 'fcint.h' into my project. This is the best solution?<BR> <BR> At first I tryed to redefine FcConfig into the source code, but it required to define also all of the inner variables... So I dicided to include 'fcint.h' into the source code...<BR> <BR> Thanks again.<BR> <BR> Em Sex, 2004-01-02 às 12:16, Adriano Del Vigna de Almeida escreveu: <BLOCKQUOTE TYPE=CITE> <FONT COLOR="#737373"><I>Hello folks,<BR> <BR> I'm having a strange error. When I try to access some internal variable inside a FcConfig strucutre from a program I receive the following error:<BR> <BR> gcc -I /usr/include/freetype2 `pkg-config --cflags glib-2.0` -lfontconfig `pkg-config --libs glib-2.0` main.c fontsbase.c fcconfighandlers.c -o fontman<BR> main.c: In function `ListAllFonts':<BR> main.c:328: error: dereferencing pointer to incomplete type<BR> make: ** [all] Erro 1<BR> <BR> /***** CODE SNIPET ******************************/<BR> <BR> <BR> FcConfig *Config = NULL;<BR> FcFontSet *FontSet = NULL;<BR> <BR> FcPattern *Pattern = NULL;<BR> FcObjectSet *ObjectSet = NULL;<BR> FcChar8 *Family;<BR> <BR> unsigned int count;<BR> <BR> Config = FcInitLoadConfigAndAllFonts();<BR> if(Config == NULL)<BR> {<BR> puts("Error on creating a Fontconfig configuration!");<BR> return(0);<BR> }<BR> <BR> FcConfigSetCurrent(Config);<BR> <BR> Pattern = FcPatternCreate();<BR> ObjectSet = FcObjectSetBuild(FC_FAMILY, 0);<BR> FontSet = FcFontList(0, Pattern, ObjectSet);<BR> <BR> for(count = 0; count < FontSet->nfont; count++)<BR> {<BR> FcPatternGetString(FontSet->fonts[count], FC_FAMILY, 0, &Family);<BR> <BR> /** I GOT AN ERROR AT THIS LINE!! ****************************/<BR> if(FcStrSetMember(Config->disabledFonts, Family))<BR> /************************************************************/<BR> <BR> printf("%s\t\t!!DISABLED!!\n", Family);<BR> else<BR> printf("%s\n", Family);<BR> }<BR> }<BR> <BR> /******* END *******************************/<BR> <BR> By the way, disabledFonts is a FcStrSet variable inside FcConfig structure. What I'm doing wrong? I have never seen this error before...<BR> <BR> Thanks for the attention!<BR> </I></FONT><BR> <TABLE CELLSPACING="0" CELLPADDING="0" WIDTH="100%"> <TR> <TD> -- <BR> Adriano Del Vigna de Almeida <<A HREF="mailto:katmandu@xxxxxxxxx"><U>katmandu@xxxxxxxxx</U></A>> </TD> </TR> </TABLE> </BLOCKQUOTE> </BODY> </HTML> --=-bcpUnL2CQAXPjp6pa93o--