"A duplicate insert block exists for class xx in the source files"

597 Views Asked by At

In Embedded Visual Studio 4, I'm attempting to add a class though the class wizard. Since, the file existed already, the first attempt failed. So I deleted the file and attempted to add the class again.

Now I get the error message

"A duplicate insert block exists for class xx in the source files"

and I can't figure out what to do about it, apart from roll back my code.

Has anyone seen this, if so, would you know how to fix it?

1

There are 1 best solutions below

0
On

It's saying that you have duplicate blocks, not duplicate entries. Perhaps you renamed a block by mistake.

e.g. say in AFX block,

Check that you have only one of each of these in MyClass.h:

//{{AFX_DATA(CMyClass)
//{{AFX_VIRTUAL(CMyClass)
//{{AFX_MSG(CMyClass)

...and that you have only one of each of these in MyClass.cpp:

//{{AFX_DATA_INIT(CMyClass)
//{{AFX_DATA_MAP(CMyClass)
//{{AFX_MSG_MAP(CMyClass)