Compiler Error C3139

 

The new home for Visual Studio documentation is Visual Studio 2017 Documentation on docs.microsoft.com.

The latest version of this topic can be found at Compiler Error C3139.

struct' : cannot export a UDT without members

You attempted to apply the export attribute to an empty UDT (user-defined type). For example:

// C3139.cpp  
#include "unknwn.h"  
[emitidl];  
[module(name=xx)];  
  
[export] struct MyStruct {   // C3139 empty type  
};  
int main(){}  

Show: