VS2010+ICE3.5运行官方demo报错----std::bad_alloc
2013-09-22 20:41
501 查看
纠结了一晚上,在release版本下运行没问题,一到debug就报错,卡在
Ice::ObjectAdapterPtr adapter = ic->createObjectAdapterWithEndpoints("SimplePrinterAdapter","default -p 10000");
因为本人新手,只能求助google,百度。结果没能用的上的答案。
没办法,只有去官网求助了,终于找到一篇文档,看到标题就泪伤了,希望就这么悄无声息的。
原文:
The most common reason is a library mix-up. When you build your application in debug mode (that is, with
The binary Ice distribution on Windows includes both debug and release libraries: use the import libraries with a
也就是说,debug模式下,运行的依赖库为
iced.lib
iceutild.lib
是有后缀的lib。
再啰嗦一句,在release模式下,引用的依赖库就是
ice.lib
iceutil.lib
Ice::ObjectAdapterPtr adapter = ic->createObjectAdapterWithEndpoints("SimplePrinterAdapter","default -p 10000");
因为本人新手,只能求助google,百度。结果没能用的上的答案。
没办法,只有去官网求助了,终于找到一篇文档,看到标题就泪伤了,希望就这么悄无声息的。
Why does my application work fine in release mode but crash in debug mode?
http://doc.zeroc.com/pages/viewpage.action?pageId=2523181原文:
The most common reason is a library mix-up. When you build your application in debug mode (that is, with
_DEBUGdefined), the compiler uses a debug version of the memory allocation and deallocation functions (see this MSDN page). When using Ice, memory is sometimes allocated by Ice and deallocated by the application (or vice-versa). You cannot allocate memory with the release version and deallocate this memory with the debug version, therefore it is critical that your application and the Ice libraries linked with your application use the same heap allocation functions.
The binary Ice distribution on Windows includes both debug and release libraries: use the import libraries with a
dsuffix (such as
iced.liband
iceutild.lib) to link with the debug DLLs.
也就是说,debug模式下,运行的依赖库为
iced.lib
iceutild.lib
是有后缀的lib。
再啰嗦一句,在release模式下,引用的依赖库就是
ice.lib
iceutil.lib
相关文章推荐
- VS2010+ICE3.5运行官方demo报错----std::bad_alloc
- VS2010+ICE3.5运行官方demo报错----std::bad_alloc
- ICE学习笔记一----运行官方的java版demo程序
- 【OSG运行错误】Unhandled exception at 0x7709B872 in XXXX.exe:Microsoft C++exception:std::bad_alloc
- ICE学习笔记一----运行官方的java版demo程序
- 第一次调用微信官方的Demo应该怎样才能运行成功
- Android集成银联支付,跳过大坑,快速运行官方给的demo
- Spring boot 官方文档 创建demo项目并运行
- std::bad_alloc 内存分配出错 长文
- 【error】new抛出std::bad_alloc
- 久别重逢的 std::bad_alloc
- 错误:'bad_alloc' : is not a member of 'stlp_std'
- std::bad_alloc 内存分配失败(备份)
- Tensorflow:terminate called after throwing an instance of 'std::bad_alloc' what(): std::bad_alloc
- 运行IceGrid demo程序(simple)
- std::bad_alloc 内存分配出错
- std::bad_alloc 内存分配失败(备份)
- 遭遇std::bad_alloc,内存分配失败
- Ubuntu16.04 编译ijkplayer so,并导入android,运行官方demo
- 运行百度语音识别官方iOS demo,无法离线识别解决办法