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 不是内部或外部命令,也不是可运行的程序.这 ...
随机推荐
- DreamWeaver文件保存时,提示"发生共享违例"问题的解决方法
在学习牛腩老师的JS视频中,视频中的例子要求实现一个是23个3相乘的结果,在用Dreamweaver制作时,, <script language="javascript" t ...
- 解决getJdbcTemplate往oracle数据库中插入数据返回主键出错问题
我们使用Spring中的JdbcDaoSupport往Mysql中插入数据并返回主键代码,我们使用的mysql数据库,主键在数据库中设置为自增长:该类继承自JdbcDaoSupport,所以能直接使用 ...
- Flashback Drop实例操作
1.Flashback DropFlashback Drop 是从Oracle 10g 开始出现的,用于恢复用户误删除的对象(包括表,索引等), 这个技术依赖于Tablespace Recycle B ...
- 怎么改变Android手机里面文件的打开方式?包括文件管理器或者需要用到文件的APP
工具-程序-qq-清除默认设置 设置>程序与功能>默认
- django Model模型二及Model模型对数据库的操作
在django模型中负责与数据库交互的为Model层,Model层提供了一个基于orm的交互框架 一:创建一个最基本的Model from __future__ import unicode_lite ...
- Code Complete阅读笔记(三)
2015-05-26 628 Code-Tuning Techniques ——Even though a particular technique generally represen ...
- Sql语句不能识别Go的解决办法(动态创建表的触发器)
问题来源 用sqlserver直接打开sql文本,执行没问题,但是当用Sqlcommand类执行cmdtext命令文本时总是失败报错. 原因分析及解决 用数据库直接执行sql语句没问题,甚至还可以用G ...
- IOS UI篇—UILabel的文字顶部对齐
UILabel的文字顶部对齐 NOV 20TH, 2011 默认UILabel是垂直居中对齐的,如果你的UILabel高度有多行,当内容少的时候,会自动垂直居中. 如下图所示(图片来自stackove ...
- 省市联动JQ封装比较简洁调用的方法
前言 因为省市联动的需求在每个项目几乎存在,所以本人也对此在web页面通过封装比较简洁的JQ方法循环判断调用调用后台获取数据再绑定到Select表单上.如果对代码有什么疑问或者更好办法可以在评论区留言 ...
- javascript版1024游戏源码
<!DOCTYPE html> <html> <head> <meta http-equiv="Content-Type" content ...