VS2010+ICE3.5运行官方demo报错----std::bad_alloc
纠结了一晚上,在release版本下运行没问题,一到debug就报错,卡在
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 _DEBUG defined), 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 d suffix (such as iced.lib and 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的更多相关文章
- AS 新安装Android Studio运行项目前报错:Unable to access Android SDK add-on list
新安装Android Studio运行项目前报错:Unable to access Android SDK add-on list AS启动后,会在默认路径下检测是否有Android SDK,如果没有 ...
- Android——eclipse下运行android项目报错 Conversion to Dalvik format failed with error 1解决
在eclipse中导入android项目,项目正常没有任何错误,但是运行时候会报错,(clean什么的都没用了.....)如图: 百度大神大多说是jdk的问题,解决: 右键项目-Properties如 ...
- Window7中Eclipse运行MapReduce程序报错的问题
按照文档:http://www.micmiu.com/bigdata/hadoop/hadoop2x-eclipse-mapreduce-demo/安装配置好Eclipse后,运行WordCount程 ...
- 用java运行Hadoop程序报错:org.apache.hadoop.fs.LocalFileSystem cannot be cast to org.apache.
用java运行Hadoop例程报错:org.apache.hadoop.fs.LocalFileSystem cannot be cast to org.apache.所写代码如下: package ...
- eclipse运行hadoop程序报错:Connection refused: no further information
eclipse运行hadoop程序报错:Connection refused: no further information log4j:WARN No appenders could be foun ...
- Ansible 脚本运行一次后,再次运行时出现报错情况,原因:ansible script 的格式不对,应改成Unix编码
Ansible 脚本运行一次后,再次运行时出现报错情况,原因:ansible script 的格式不对,应改成Unix编码 find . -name "*" | xargs do ...
- 运行安装mysql 报错 [root@localhost mysql-mult]# ./scripts/mysql_install_db --defaults-file=conf/3306my.cnf FATAL ERROR: please install the following Perl modules before executing ./scripts/mysql_install_
运行安装mysql 报错 [root@localhost mysql-mult]# ./scripts/mysql_install_db --defaults-file=conf/3306my.cn ...
- debug运行java程序报错
debug运行java程序报错 ERROR: transport error 202: connect failed: Connection timed out ERROR: JDWP Transpo ...
- yii2框架安装运行init.bat报错php.exe不是内部或外部命令
在安装yii2框架的时候,遇到一个很纠结的问题.就是当我把安装包下载下来之后,在公司的电脑安装可以正常,当我回家用自己的电脑安装就报错,提示 php.exe 不是内部或外部命令,也不是可运行的程序.这 ...
随机推荐
- HDU 4121 Xiangqi (算是模拟吧)
传送门:http://acm.hdu.edu.cn/showproblem.php?pid=4121 题意:中国象棋对决,黑棋只有一个将,红棋有一个帅和不定个车 马 炮冰给定位置,这时当黑棋走,问你黑 ...
- App签名--- Android
步骤: 下面就Next即可
- Windows - 程序猿应该熟记的CMD常用命令
notepad 计事本 mspaint 画图 iisreset 重启IIS appwiz.cpl 控制面板 inetmgr IIS管理器 eventvwr 事件查看器 mstsc 远程桌面 net s ...
- CSS 设计彻底研究(三)深入理解盒子模型
第三章 深入理解盒子模型 盒子模型是CSS控制页面的基础.需要清楚“盒子”的含义是什么,以及盒子的组成.此外,应该理解DOM的基本概念,以及DOM树是如何与一个HTML文档对应的,在此基础上充分理解“ ...
- poj1088 经典DP
滑雪 Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 88296 Accepted: 33100 Description ...
- 写一个Windows上的守护进程(4)日志其余
写一个Windows上的守护进程(4)日志其余 这次把和日志相关的其他东西一并说了. 一.vaformat C++日志接口通常有两种形式:流输入形式,printf形式. 我采用printf形式,因为流 ...
- [uva11916] Emoogle Grid (离散对数)
转载请注明出处: http://www.cnblogs.com/fraud/ ——by fraud Emoogle Grid You have to color an MxN ( ...
- HTTP协议入门知识
HTTP超文本传输协议,是客户端浏览器和服务器通信的规范,是浏览器与服务器通信的协议,属于应用层的协议,web开发者了解HTTP协议非常重要.浏览器通过http协议请求服务器,完成请求服务器立刻关闭连 ...
- Log4Net 的简要配置
引用log4net.dll AssemblyInfo.cs中 [assembly: AssemblyVersion("1.0.0.0")] [assembly: AssemblyF ...
- mac上访问samba服务器
打开safari输入smb://ip,回车后出现输入用户名密码对话框,若是匿名则选择作为“客人”选项 例子 smb://192.168.2.3