Andy Stewart <lazycat.mana...@gmail.com> writes:

> Axel Simon <axel.si...@in.tum.de> writes:
>
>> On 21.04.2010, at 15:10, Andy Stewart wrote:
>>
>>>>> File `Graphics/UI/Gtk/Vte/Types.chi` should generate under
>>>>> `vte/dist/build/Graphics/UI/Gtk/Vte`, but nothing.
>>>>>
>>>>
>>>> Hm, I actually don't know what's happening here. You should try to build 
>>>> with -v.
>>> Types generate right.
>>> But i still can't generate file Types.chi.
>>
>> The Setup script ignores any .chs import statement (i.e the ones that look 
>> like {# import ... #})
>> if the file cannot be found. For some reason it seems that your Types.chs 
>> file cannot be found
> that
>> the dependency of VTE.chs on  Types.chs is not generated.
>>
>> Uh, is it possible that you didn't add the Types files to the list of 
>> modules?
> BTW, i remove Tyeps import from Vte.chs, but got error:
> Structs.hsc:44:31: error: VteCharAttrFields.h: this file not exist
>
> But i have write "Graphics/UI/Gtk/Vte/VteCharAttrFields.h" in
> `Extra-Source-Files`.
> I missing something?
Ah, i search other modules, found below solution:

Remove `#include "VteCharAttrFields.h"` and call "VteCharAttrFields.h" 
explicitly.
Like below:

       foreign import ccall "VteCharAttrFields.h getVteCharAttrUnderline"
         getVteCharAttrUnderline :: Ptr VteAttributes -> IO #{type gboolean}
       
       foreign import ccall "VteCharAttrFields.h getVteCharAttrStrikethrough"
         getVteCharAttrStrikethrough :: Ptr VteAttributes -> IO #{type gboolean}
         
But i got strange error:

------------------------------> error start <------------------------------
Structs.hsc: In function ‘main’:
Structs.hsc:56: error: ‘gboolean’ undeclared (first use in this function)
Structs.hsc:56: error: (Each undeclared identifier is reported only once
Structs.hsc:56: error: for each function it appears in.)
Structs.hsc:56: error: expected expression before ‘int’
Structs.hsc:56: error: expected ‘)’ before numeric constant
Structs.hsc:56: error: expected ‘)’ before numeric constant
Structs.hsc:56: warning: too few arguments for format
Structs.hsc:59: error: expected expression before ‘int’
Structs.hsc:59: error: expected ‘)’ before numeric constant
Structs.hsc:59: error: expected ‘)’ before numeric constant
Structs.hsc:59: warning: too few arguments for format
Structs.hsc:62: error: ‘VteCharAttributes’ undeclared (first use in this 
function)
Structs.hsc:65: error: expected specifier-qualifier-list before 
‘VteCharAttributes’
Structs.hsc:65: error: expected ‘;’ before ‘)’ token
Structs.hsc:65: error: expected statement before ‘)’ token
Structs.hsc:66: error: expected specifier-qualifier-list before 
‘VteCharAttributes’
Structs.hsc:66: error: expected ‘;’ before ‘)’ token
Structs.hsc:66: error: expected statement before ‘)’ token
Structs.hsc:67: error: expected specifier-qualifier-list before 
‘VteCharAttributes’
Structs.hsc:67: error: expected ‘;’ before ‘)’ token
Structs.hsc:67: error: expected statement before ‘)’ token
Structs.hsc:68: error: expected specifier-qualifier-list before 
‘VteCharAttributes’
Structs.hsc:68: error: expected ‘;’ before ‘)’ token
Structs.hsc:68: error: expected statement before ‘)’ token
Structs.hsc:85: error: expected specifier-qualifier-list before ‘GArray’
Structs.hsc:85: error: expected ‘;’ before ‘)’ token
Structs.hsc:85: error: expected statement before ‘)’ token
Structs.hsc:85: error: ‘guint’ undeclared (first use in this function)
Structs.hsc:85: error: expected expression before ‘int’
Structs.hsc:85: error: expected ‘)’ before numeric constant
Structs.hsc:85: error: expected ‘)’ before numeric constant
Structs.hsc:85: warning: too few arguments for format
Structs.hsc:86: error: expected specifier-qualifier-list before ‘GArray’
Structs.hsc:86: error: expected ‘;’ before ‘)’ token
Structs.hsc:86: error: expected statement before ‘)’ token
------------------------------> error end   <------------------------------

So strange, `gboolean` is undeclared? I don't understand.         

  -- Andy



------------------------------------------------------------------------------
_______________________________________________
Gtk2hs-devel mailing list
Gtk2hs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gtk2hs-devel

Reply via email to