error C2653: 'CMessageLog' : is not a class or namespace name


  • I am getting the error "error C2653: 'CMessageLog' : is not a class or namespace name" while the following scenario:




    #include <afx.h>


    class CMessageLog



    /**Message IDs for the Tool messages*/

    enum LogMessageID












    Public Tool:: public CwinApp



               void Fun1(MessageLog::LogMessageID logmsgID, std:Tongue Tiedtring& a_strMessage);



    While trying to include "Tool.h" in to a new .cpp file of the form:


    // FilePathDialog.cpp, this files is generated by MFC with the base class od CDialog


    // FilePathDialog.cpp : implementation file


    #include "stdafx.h"

    /* Here I am trying to include too.h */

    #include "tool.h"

    #include "FilePathDialog.h"

    #ifdef _DEBUG

    #define new DEBUG_NEW

    #undef THIS_FILE

    static char THIS_FILE[] = __FILE__;



    // FilePathDialog dialog


    FilePathDialog::FilePathDialog(CWnd* pParent /*=NULL*/)

    : CDialog(FilePathDialog::IDD, pParent)



    // NOTE: the ClassWizard will add member initialization here




    void FilePathDialog:Big SmileoDataExchange(CDataExchange* pDX)


    CDialog:Big SmileoDataExchange(pDX);


    // NOTE: the ClassWizard will add DDX and DDV calls here




    BEGIN_MESSAGE_MAP(FilePathDialog, CDialog)


    // NOTE: the ClassWizard will add message map macros here




    // FilePathDialog message handlers


    Now the above said error is issued. Can anyone help me in solving this error, please?






    Tuesday, June 12, 2007 2:13 PM


All replies

  • #include messagelog.h in tool.h
    Tuesday, June 12, 2007 2:20 PM
  • Hello,


    Thank you very much for your quick response. Now that error is gone. Now I a getting another error: "error C2653: std' : is not a class or namespace name"

    What header file I need to include?
    Tuesday, June 12, 2007 2:37 PM
  • #include <string>


    If you get more errors like this, paste in the line that the error occurs on (double click the error in the output window to go to it).

    Tuesday, June 12, 2007 2:41 PM
  • Hi,

    Thanks for the help. Now it is working fine.


    Wednesday, June 13, 2007 9:35 AM