编译器错误 C3370

“idl_module nam”:idl_module 尚未定义

使用 idl_module 在 DLL 中指定入口点前,必须首先使用 idl_module 指定 DLL 名称。

以下示例生成 C3370:

// C3370.cpp
[module(name=MyLibrary)];
// uncomment the following line to resolve the error
// [idl_module(name="name1", dllname=x.dll)];
[idl_module(name="name1"), entry(100)] // C3370
int f1();

int main()
{
}