Visual Studio Developer Center > Visual Studio Forums > Visual Studio Debugger > Symbol not found errors for Class Member Variables when Watching
Ask a questionAsk a question
 

AnswerSymbol not found errors for Class Member Variables when Watching

  • Tuesday, June 30, 2009 9:53 AMbrian_boru_79 Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    Hi.

    I'm getting -

            cells    CXX0017: Error: symbol "localIsOpen" not found   

    when debugging code using VS 2008 Pro. My class looks something like (cpp file)-

    namespace BatchEngine
    {
      const int PLAN_SIZE = 80;
      bool  localIsOpen=false;
     
      ...

      void MyFunction(int &value)
      {
        // Break point set here
        value = 10;

        ...
      }

      ...
    }

    I can view PLAN_SIZE using the debugger, but not localIsOpen. I have configured my linker as follows -

    /Od /I "..\Global" /I "..\LxShare" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "HANDLE_EXCEPTIONS" /D "_VC80_UPGRADE=0x0700" /D "_MBCS" /FD /EHsc /RTC1 /MTd /Zp1 /Fp".\Debug/Line.pch" /Fo".\Debug/" /Fd".\Debug/" /FR".\Debug\\" /W3 /nologo /c /ZI /errorReport:prompt


    MyFunction can be called from different threads launched from within the contructor for this class.

    I'm using XP.

    Any ideas why I can't watch localIsOpen?

    Thanks,

    Barry.

Answers

  • Wednesday, July 01, 2009 9:48 AMRoahn LuoMSFT, ModeratorUsers MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     Answer

    Hello,

    That's because we miss the qualifier of the variable localIsOpen in namespace BatchEngine. Please try to input BatchEngine::localIsOpen in the watch window.

    Best regards,


    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
    If you have any feedback, please tell us.
    Welcome to the All-In-One Code Framework!

All Replies

  • Wednesday, July 01, 2009 9:48 AMRoahn LuoMSFT, ModeratorUsers MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     Answer

    Hello,

    That's because we miss the qualifier of the variable localIsOpen in namespace BatchEngine. Please try to input BatchEngine::localIsOpen in the watch window.

    Best regards,


    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
    If you have any feedback, please tell us.
    Welcome to the All-In-One Code Framework!
  • Friday, November 06, 2009 5:56 PMguangxiren Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    You might need to disable the C/C++ Optimization off. Project/YourProject Property/Configuration Properties/"C/C++"/Optimization/

    Good luck,

    Zhi