Redefinition error of TSeq

3 posts / 0 new
Last post
Offline
Joined: 03/25/2018
Posts: 10
Redefinition error of TSeq

I have an IDL included all the topics, typedef and enum. When I compile, it gave error: redefinition of 'struct IdentifierType_TSeq'. It appears that there are multiple #define TSeq IdentifierType_TSeq in the .h file.

I suspect is may be wrong in the way I constructed the IDL. Can you give me some advices? Attached is the IDL.

Thanks.

CB.

AttachmentSize
Binary Data IDL 2.11 KB
Offline
Joined: 01/17/2013
Posts: 13

Hi Chee,

The IDL-to-C mapping automatically creates a new type for a structure definition. Thus, instead of this:

typedef struct IdentifierType_T
{
	long id;
	ResourceidType_E idType;
} IdentifierType_T;

this is sufficient:

struct IdentifierType_T
{
	long id;
	ResourceidType_E idType;
}; 

You can now use IdentifierType_T as a type, for example

IdentifierType_T *sample;

 

Regards,

Tron

 

Offline
Joined: 03/25/2018
Posts: 10

Hi Tron,

Thanks, it works.

Chee Beng