debugging library: CXX0017: Error: symbol "X" not found
I am debugging a library. I can step into the code however the watch window doesn't show the values of any variables. It will display a message in the value field:
Code:
m_pParent CXX0017: Error: symbol "m_pParent" not found
Interestingly it does show values for local variables in that function but not member functions. Most of my data members are member function though that I want to debug. I am using VS2010. Any tips would be greatly appreciated.
Re: debugging library: CXX0017: Error: symbol "X" not found
Quote:
Originally Posted by
zspirit
I am debugging a library. I can step into the code however the watch window doesn't show the values of any variables. It will display a message in the value field:
Code:
m_pParent CXX0017: Error: symbol "m_pParent" not found
Interestingly it does show values for local variables in that function but not member functions. Most of my data members are member function though that I want to debug. I am using VS2010. Any tips would be greatly appreciated.
You are probably debugging an optimized build, therefore the source code you're viewing when you're debugging is different than the code that was generated (variables have been moved/removed, functions inlined, loops unrolled, etc.).
There are no tips in debugging an optimized build. You're basically on your own, as the only thing you can do is debug mostly on the assembly level, not on the source level -- debugging on the assembly level is the only way to figure out where exactly you are in the function you're debugging.
Regards,
Paul McKenzie
Re: debugging library: CXX0017: Error: symbol "X" not found
I did make sure the optimization is disabled in Properties >> C/C++ >> Optimization >> Optimization = Disabled (/Od) but I still have this issue. Is there any other place I can turn of optimization? Also since it's a library so I don't have 'linker' page in properties which for exe has settings related to generating debug info.
I read elsewhere that symbol info may not have been loaded and go into debug >> windows >> Modules but I don't see my library module there either so I can't tell if symbol file is loaded properly or not.
Re: debugging library: CXX0017: Error: symbol "X" not found
I was able to fix this issue. The problem was that the libraries used by executable were in different path than created by library source code. I added library and exe project into same workspace and updated the library paths in executable properties to the one produced by the sibling library project now and that fixed the issue.
The place where I updated the library paths is Properties >> Configuration Properties >> Liner >> General page and 'Additional Library Directorires"