jans2002的博客

专注 专心 专业

应用ICE3.3项目时,STL4.6.2的一个编译错误解决

使用STLPORT常会因为某个地方的笔误,引起其他地方大量的编译错误,其错误定位比较麻烦,因为使用的是VC6,对C++支持比较差,所以更是让人头疼,Ice3.3VC6的版本使用了STLPort 4.6.2,在编译时,Release版本没问题,Debug版本却忽然报了一大堆的错误:

:\ice-3.3.0-vc60\include\stlport\stl\debug\_iterator.h(127) : error C2504: '__owned_link' : base class undefined
        d:\ice-3.3.0-vc60\include\stlport\stl\debug\_iterator.h(173) : see reference to class template instantiation '_STL::_DBG_iter_base<_Container>' being compiled
d:\ice-3.3.0-vc60\include\stlport\stl\debug\_iterator.h(146) : error C2629: unexpected 'struct _STL::_DBG_iter_base<_Container> ('
        d:\ice-3.3.0-vc60\include\stlport\stl\debug\_iterator.h(173) : see reference to class template instantiation

。。。。。

 

后来我试着在stdafx.h加了一个开关

#ifdef _DEBUG
#define _STLP_DEBUG
#endif

问题解决,STLPORT诸如此类的开关好像还有很多,详细的请参见STLPort的编译说明

#define _STLP_USE_MFC 1 //使用MFC

#define _STLP_USE_MFC 1
#ifdef _STLP_NEW_PLATFORM_SDK
#undef _STLP_NEW_PLATFORM_SDK
#endif

posted on 2008-12-08 10:57 jans2002 阅读(445) 评论(0)  编辑 收藏 引用


只有注册用户登录后才能发表评论。
网站导航: 博客园   IT新闻   BlogJava   知识库   博问   管理