编译器错误 C2757

“symbol”:具有该名称的符号已存在,因此该名称不能用作命名空间名称

当前编译中用作命名空间标识符的符号已在引用程序集中使用。

以下示例生成 C2757:

// C2757a.cpp
// compile with: /clr /LD
public ref class Nes {};

然后,

// C2757b.cpp
// compile with: /clr /c
#using <C2757a.dll>

namespace Nes {    // C2757
// try the following line instead
// namespace Nes2 {
   public ref class X {};
}