Click here to Skip to main content
15,888,454 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
I am converting an MFC application for deadlock detection in to Simple console application. During this process I found many errors saying like:

error C2365: 'CmdLockMutex' : redefinition; previous definition was 'enumerator'


I am unable to remove this error.
Kindly if someone could help me in this regard.
Posted
Updated 11-Jun-10 5:16am
v2
Comments
Moak 11-Jun-10 11:18am    
Updated subject and tags, hope this helps to find an answer. Probably helps if you show source code.

You've defined CmdLockMutex more than once. Perhaps you've got an issue with your #include files ? Is this an MFC class and you've not got MFC linked to your console app ? Hard to say more without seeing code.
 
Share this answer
 
Sounds like you need a header guard around your definition of `CmdLockMutex` (Add `#pragma once` at the top of its .h file.). Or rather you have a naming conflict.



Maybe you have something like this:


enum MyEnum { MyEnumVal1, MyEnumVal2 };

//....

class MyEnum
{
    
};
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900