runtime error R6025 - pure virtual function call 错误!急!请帮忙解决!

fyjin99 2006-08-04 03:58:23
我写了一个类,其中有一个函数A(),在不将这个类封装成LIB库,直接包含在工程中调用的时候没有任何问题,一旦封装成LIB库调用则出现runtime error R6025 - pure virtual function call 错误!请各位帮忙分析一下原因和可能的解决方法!急!谢谢!
...全文
2336 11 打赏 收藏 转发到动态 举报
写回复
用AI写文章
11 条回复
切换为时间正序
请发表友善的回复…
发表回复
fyjin99 2006-08-07
  • 打赏
  • 举报
回复
REALSE调用REALSE DLL一样出错,我把warning level设置到4,没有发现相关的Warning,呜~~~~~~~~~~~~~~~~~
折腾_苏州 2006-08-05
  • 打赏
  • 举报
回复
这个很麻烦,Release方式在编译的时候对代码做了很强的优化。
你试试用REALSE调用REALSE DLL呢?
如果还不行的话:
VC6.0 在realse优化时会有些问题,
在project -> settings -> c/c++ -> code genration -> Use run-time library 选Debug multithread 方式,这样暂时用了Debug multithread 的方式产生可执行文件,
不过完美的方案是找到问题的隐患,把warning level设置到4,找原因吧>....
fyjin99 2006-08-05
  • 打赏
  • 举报
回复
找到一点问题廖,Debug模式下封装后调用没有错误,Release下则出现该错误!请帮忙解决阿!
折腾_苏州 2006-08-05
  • 打赏
  • 举报
回复
怎么封装的?Debug模式,还是Realse模式?
fyjin99 2006-08-04
  • 打赏
  • 举报
回复
关键问题是我把类包含在工程中调用的时候没有问题,而用LIB库德时候才有问题。请各位帮忙解决!
fyjin99 2006-08-04
  • 打赏
  • 举报
回复
cleverwyq(cleverman)
怎么封装的

就是把这个类做成廖一个LIB文件,生成LIB库后,在工程中调用,其他函数都没有问题,就是那个A()函数有问题。
fyjin99 2006-08-04
  • 打赏
  • 举报
回复
SoLike(思危)能不能说的详细点啊,谢谢
思危 2006-08-04
  • 打赏
  • 举报
回复
接口类指针没有指到实现类上。
lixiaosan 2006-08-04
  • 打赏
  • 举报
回复
http://support.microsoft.com/kb/125749/en-us
cleverwyq 2006-08-04
  • 打赏
  • 举报
回复
pure virtual function call

No object has been instantiated to handle the pure virtual function call.

This error is caused by calling a virtual function in an abstract base class through a pointer which is created by a cast to the type of the derived class, but is actually a pointer to the base class. This can occur when casting from a void* to a pointer to a class when the void* was created during the construction of the base class.

cleverwyq 2006-08-04
  • 打赏
  • 举报
回复
怎么封装的

15,471

社区成员

发帖
与我相关
我的任务
社区描述
VC/MFC 进程/线程/DLL
社区管理员
  • 进程/线程/DLL社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧