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:

-----------------------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
--










Attachment: pgpr9hPZGnVvC.pgp
Description: PGP signature

Reply via email to