E2495 Redefinition of uuid is not identical (C++)

From RAD Studio
Jump to: navigation, search

Go Up to Compiler Errors And Warnings (C++) Index

GUID's attached to structs have to be the same across multiple declarations and definitions of the same struct. So the following example would cause this error:

class __declspec(uuid("19a76fe0-7494-11d0-8816-00a0c903b83c")) foo;
class __declspec(uuid("00000000-7494-11d0-8816-00a0c903b83c")) foo{}