Compilerfehler C3174

Das Modul-Attribut wurde nicht angegeben.

Ein Programm, das Visual C++-Attribute verwendet, verwendet nicht auch das Modul-Attribut , das in jedem Programm erforderlich ist, das Attribute verwendet.

Im folgenden Beispiel wird C3174 generiert:

// C3174.cpp
// C3174 expected
// uncomment the following line to resolve this C3174
// [module(name="x")];
[export]
struct S
{
   int i;
};

int main()
{
}