Overloaded member function not found in CNoteMgr
-
Hi, I create MFC extension DLL and wrote couple of functions adding one class i.e.CNoteMgr in the DLL workspace. In the class header of CNoteMgr, there are two functions whose signature is given as below : BOOL CNoteMgr::drawLine(HDC,HPEN,POINT,HWND); BOOL CNoteMgr::drawCurve(HDC,POINT,HWND); The implementation has been done in different way for line drawing and drawing curve. But while compiling the DLL, i am getting the following errors as below : **************************************************************************************** Compiling... Notebook.cpp D:\FancyViewer\Notebook\Notebook.cpp(78) : warning C4101: 'msg' : unreferenced local variable NoteMgr.cpp D:\FancyViewer\Notebook\NoteMgr.cpp(632) : error C2511: 'drawLine' : overloaded member function 'int (struct HDC__ *,struct HPEN__ *,struct tagPOINT [],struct HWND__ *)' not found in 'CNoteMgr' d:\fancyviewer\notebook\notemgr.h(29) : see declaration of 'CNoteMgr' D:\FancyViewer\Notebook\NoteMgr.cpp(665) : error C2511: 'drawCurve' : overloaded member function 'int (struct HDC__ *,struct tagPOINT [],struct HWND__ *)' not found in 'CNoteMgr' d:\fancyviewer\notebook\notemgr.h(29) : see declaration of 'CNoteMgr' D:\FancyViewer\Notebook\NoteMgr.cpp(838) : warning C4800: 'unsigned char' : forcing value to bool 'true' or 'false' (performance warning) Generating Code... Error executing cl.exe... **************************************************************************************** PLEASE NOTE that the error id is "C2511". I do not know where the point of overloading comes as the method names are different. I found from MSDN regarding the error C2511 and tried all possibilities but still the problem persists. ========================================================================================= MSDN says that for the error C2511 'identifier' : overloaded member function not found in 'class' No version of the function is declared with the specified parameters. Possible causes : (1)Wrong parameters passed to function. (2)Parameters passed in wrong order. (3)Incorrect spelling of parameter names. The following sample generates C2511: Example -> // C2511.cpp class C { int c_2; int Func(char *, char *); }; int C::Func(char *, char *, int i) { // C2511 // try ... // int C::Func(char *, char *) { return 0; }========================================================================================= Can anyone help me out please ??
-
Hi, I create MFC extension DLL and wrote couple of functions adding one class i.e.CNoteMgr in the DLL workspace. In the class header of CNoteMgr, there are two functions whose signature is given as below : BOOL CNoteMgr::drawLine(HDC,HPEN,POINT,HWND); BOOL CNoteMgr::drawCurve(HDC,POINT,HWND); The implementation has been done in different way for line drawing and drawing curve. But while compiling the DLL, i am getting the following errors as below : **************************************************************************************** Compiling... Notebook.cpp D:\FancyViewer\Notebook\Notebook.cpp(78) : warning C4101: 'msg' : unreferenced local variable NoteMgr.cpp D:\FancyViewer\Notebook\NoteMgr.cpp(632) : error C2511: 'drawLine' : overloaded member function 'int (struct HDC__ *,struct HPEN__ *,struct tagPOINT [],struct HWND__ *)' not found in 'CNoteMgr' d:\fancyviewer\notebook\notemgr.h(29) : see declaration of 'CNoteMgr' D:\FancyViewer\Notebook\NoteMgr.cpp(665) : error C2511: 'drawCurve' : overloaded member function 'int (struct HDC__ *,struct tagPOINT [],struct HWND__ *)' not found in 'CNoteMgr' d:\fancyviewer\notebook\notemgr.h(29) : see declaration of 'CNoteMgr' D:\FancyViewer\Notebook\NoteMgr.cpp(838) : warning C4800: 'unsigned char' : forcing value to bool 'true' or 'false' (performance warning) Generating Code... Error executing cl.exe... **************************************************************************************** PLEASE NOTE that the error id is "C2511". I do not know where the point of overloading comes as the method names are different. I found from MSDN regarding the error C2511 and tried all possibilities but still the problem persists. ========================================================================================= MSDN says that for the error C2511 'identifier' : overloaded member function not found in 'class' No version of the function is declared with the specified parameters. Possible causes : (1)Wrong parameters passed to function. (2)Parameters passed in wrong order. (3)Incorrect spelling of parameter names. The following sample generates C2511: Example -> // C2511.cpp class C { int c_2; int Func(char *, char *); }; int C::Func(char *, char *, int i) { // C2511 // try ... // int C::Func(char *, char *) { return 0; }========================================================================================= Can anyone help me out please ??