Compiler Error C4277 in VS.NET 2003...

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.
 
R

Ronald Laeremans [MSFT]

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top