Compiler Error C3320

Error Message

'type': type cannot have the same name as the module 'name' property

An exported user-defined type (UDT), which could be a struct, class, enum, union or __value, cannot have the same name as the parameter passed to the module attribute's name property.

The following sample generates C3320:

// C3320.cpp
#include "unknwn.h"
[module(name="xx")];

[export] struct xx {   // C3320
// Try the following line instead
// [export] struct yy {
   int i;
};

Community Additions

ADD
Show: