Edit

Share via


Compiler Error C2757

'symbol' : a symbol with this name already exists and therefore this name cannot be used as a namespace name

A symbol used in the current compilation as a namespace identifier is already being used in a referenced assembly.

The following sample generates C2757:

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

And then,

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

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