Compiler Error C4277 in VS.NET 2003...

  • Thread starter Thread starter Dave Reed
  • Start date Start date
D

Dave Reed

I'm getting this error:

Script View.cpp(40) : warning C4277: imported
item 'Homegazer::CoreLibrary::ScriptTable::_Deleted'
exists as both data member and function member; data
member ignored

ScriptTable is a C# class with a constructor and some
static members and "Script View.cpp" is a native C++
class and one of the offending lines is the code snippet
below:

Keyword=dynamic_cast<System::String*>
(ScriptTable::OpCodeTable[nCount].name);

It seems any attempt to access the static public
properties of the class from a native c++ class causes
the error and I can't find any reference to a C4277 in
the MSDN.

Dave Reed
Ciber, Inc.
 
Can you try to rebuild your C# code without the /incremental switch. The
_Deleted metadata token is a leftover from the C# incremental build and the
C++ compiler has a problem handling it.

Ronald Laeremans
Visual C++ team
 
Back
Top