各位:
我的程序在debug下编译一切正常,但在release下编译出错:
错误信息:
2、error C2509: 'GetDocument' : member function not declared in 'CMyListView'
错误总是指向.h中的:
#ifndef _DEBUG // debug version in viewgrid.cpp
inline CTreeListDoc* CMyListView::GetDocument()
{ return (CTreeListDoc*)m_pDocument; }
#endif
我看了一下CMyListView(基类是CListView)中确实没有GetDocument()函数,但这两行是系统自己生成的呀. 我实在没辙了,请大家帮忙!!!!先谢谢了!
我的程序在debug下编译一切正常,但在release下编译出错:
错误信息:
2、error C2509: 'GetDocument' : member function not declared in 'CMyListView'
错误总是指向.h中的:
#ifndef _DEBUG // debug version in viewgrid.cpp
inline CTreeListDoc* CMyListView::GetDocument()
{ return (CTreeListDoc*)m_pDocument; }
#endif
我看了一下CMyListView(基类是CListView)中确实没有GetDocument()函数,但这两行是系统自己生成的呀. 我实在没辙了,请大家帮忙!!!!先谢谢了!
#ifndef _DEBUG // debug version in viewgrid.cpp
#endif
这两行删掉不行吗?
感谢各位的热心帮助,问题还是不能解决。我想我还是离开VC算了,学JAVA吧,
这种debug能过但release出错的问题我遇到好几次了,可能我的代码不规范引起的,
但太难查了,VC光是这个问题就累死人了。
最后还是衷心的感谢大家!!
祝大家愉快!!!
#include "CMyListDoc.h" //***是你的工程名称
也就是把文档类的头文件包含进来。