On Mon, 26 Jul 2004 23:45:37 +0200 phriedrich <[EMAIL PROTECTED]> babbled:

> Hi,
> 
> I'm writing a small program [1] using ecore, evas and some other e-libs
> now, when I include Edje.h the compile breaks with the following message:
> 
> */usr/local/include/Edje.h:7: error: use of enum `_Edje_Message_Type'
> without previous declaration */usr/local/include/Edje.h:9: error: multiple
> definition of `enum _Edje_Message_Type' */usr/local/include/Edje.h:7:
> error: previous definition here
> 
> I've played around with it a while and found a solution:
> 
> I've to change the order of some lines in Edje.h, as the following:

yeah - i know. some compilers (especially in bitchy ansi pedantic mode) don't
allow forward declarations of enums. fixed.

> -----------------------original-snip-----------------------------------
> 
> #include <Evas.h>
> 
> /* FIXDOC: Define these? */
> typedef enum _Edje_Message_Type Edje_Message_Type;
> enum _Edje_Message_Type
> {
>    EDJE_MESSAGE_NONE = 0,
> 
>      EDJE_MESSAGE_SIGNAL = 1, /* DONT USE THIS */
> 
>      EDJE_MESSAGE_STRING = 2,
>      EDJE_MESSAGE_INT = 3,
>      EDJE_MESSAGE_FLOAT = 4,
> 
>      EDJE_MESSAGE_STRING_SET = 5,
>      EDJE_MESSAGE_INT_SET = 6,
>      EDJE_MESSAGE_FLOAT_SET = 7,
> 
>      EDJE_MESSAGE_STRING_INT = 8,
>      EDJE_MESSAGE_STRING_FLOAT = 9,
> 
>      EDJE_MESSAGE_STRING_INT_SET = 10,
>      EDJE_MESSAGE_STRING_FLOAT_SET = 11
> };
> 
> typedef struct _Edje_Message_String           Edje_Message_String;
> typedef struct _Edje_Message_Int              Edje_Message_Int;
> typedef struct _Edje_Message_Float            Edje_Message_Float;
> typedef struct _Edje_Message_String_Set       Edje_Message_String_Set;
> typedef struct _Edje_Message_Int_Set          Edje_Message_Int_Set;
> typedef struct _Edje_Message_Float_Set        Edje_Message_Float_Set;
> typedef struct _Edje_Message_String_Int       Edje_Message_String_Int;
> typedef struct _Edje_Message_String_Float     Edje_Message_String_Float;
> typedef struct _Edje_Message_String_Int_Set   Edje_Message_String_Int_Set;
> typedef struct _Edje_Message_String_Float_Set
> Edje_Message_String_Float_Set;
> 
> --------------------------------------original-snip----------------------
> 
> 
> 
> -------------------------------changed-one-------------------------
> #include <Evas.h>
> 
> /* FIXDOC: Define these? */
> enum _Edje_Message_Type
> {
>    EDJE_MESSAGE_NONE = 0,
> 
>      EDJE_MESSAGE_SIGNAL = 1, /* DONT USE THIS */
> 
>      EDJE_MESSAGE_STRING = 2,
>      EDJE_MESSAGE_INT = 3,
>      EDJE_MESSAGE_FLOAT = 4,
> 
>      EDJE_MESSAGE_STRING_SET = 5,
>      EDJE_MESSAGE_INT_SET = 6,
>      EDJE_MESSAGE_FLOAT_SET = 7,
> 
>      EDJE_MESSAGE_STRING_INT = 8,
>      EDJE_MESSAGE_STRING_FLOAT = 9,
> 
>      EDJE_MESSAGE_STRING_INT_SET = 10,
>      EDJE_MESSAGE_STRING_FLOAT_SET = 11
> };
> 
> typedef enum _Edje_Message_Type Edje_Message_Type;
> typedef struct _Edje_Message_String           Edje_Message_String;
> typedef struct _Edje_Message_Int              Edje_Message_Int;
> typedef struct _Edje_Message_Float            Edje_Message_Float;
> typedef struct _Edje_Message_String_Set       Edje_Message_String_Set;
> typedef struct _Edje_Message_Int_Set          Edje_Message_Int_Set;
> typedef struct _Edje_Message_Float_Set        Edje_Message_Float_Set;
> typedef struct _Edje_Message_String_Int       Edje_Message_String_Int;
> typedef struct _Edje_Message_String_Float     Edje_Message_String_Float;
> typedef struct _Edje_Message_String_Int_Set   Edje_Message_String_Int_Set;
> typedef struct _Edje_Message_String_Float_Set
> Edje_Message_String_Float_Set;
> 
> -----------------------changed-one--------------------------------------
> 
> 
> 
> Or to say it just in a few words:
> 
> I moved the line
> typedef enum _Edje_Message_Type Edje_Message_Type;
> from _before_ 
> enum _Edje_Message_Type{....}
> to behind (Moved line 7 to 28)
> 
> 
> 
> I haven't tested yet to compile other programs again and check if they're
> still working, but they should do.
> 
> I hope this is working generaly, and if could be done in this way in
> further versions of edje.
> 
> Regards,
> 
> Friedrich
> 
> ---
> [1]:http://www.phriedrich.artfact.at/pages/projectdetail.php?lang=en@&cal
> l=../projects/eloquence/desc
> --
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 


-- 
------------- Codito, ergo sum - "I code, therefore I am" --------------
The Rasterman (Carsten Haitzler)    [EMAIL PROTECTED]
熊耳 - 車君 (数田)                  [EMAIL PROTECTED]
Tokyo, Japan (東京 日本)


-------------------------------------------------------
This SF.Net email is sponsored by BEA Weblogic Workshop
FREE Java Enterprise J2EE developer tools!
Get your free copy of BEA WebLogic Workshop 8.1 today.
http://ads.osdn.com/?ad_id=4721&alloc_id=10040&op=click
_______________________________________________
enlightenment-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel

Reply via email to