摘要: 转载:http://blog.csdn.net/ysdaniel/article/details/7043395出现Error #include nested too deeply 原因是:头文件相互包含。例如,一个工程中bsp.h 包含 LocDongle.h, LocDongle.h又包含bsp.h,编译时就会报Error #include nested too deeply 。解决办法:1、将两个头文件共用的那一部分抽出来单独建一个头文件。2、加预处理#ifndef.. #define...#endif[cpp]view plaincopy//bsp.h#ifndef_BSP_H_#de 阅读全文
posted @ 2013-12-13 14:04 yunsicai 阅读(2964) 评论(0) 推荐(0)
摘要: 转载:http://www.eefocus.com/pengwr/blog/2012-02/235057_baf52.html此时你可以locate libXXX.so.x 一下,查看系统里是否有该文件,大部分情况是该文件存在。然后把libXXX.so.3所在的目录加入到 /etc/ld.so.conf 中。如果发现libXXX.so.x不存在,你可能没安装包含库的程序。一般google一下“XXX linux”就能找到相应的软件.如,我执行一个fedora10 的内核编译配置时,输入make xconfig,出现以下提示:error while loading shared librarie 阅读全文
posted @ 2013-12-04 17:43 yunsicai 阅读(11704) 评论(0) 推荐(0)
摘要: 这个问题产生的原因是由于ubtun系统默认是没有激活root用户的,需要我们手工进行操作,在命令行界面下,或者在终端中输入如下命令: sudo passwd Password:你当前的密码 Enter new UNIX password:这个是root的密码 Retype new UNIX password:重复root的密码 然后会提示成功的信息。 在说明一点,使用su和sudo是有区别的,使用su切换用户需要输入所切换到的用户的密码,而使用sudo则是当前用户的密码。 阅读全文
posted @ 2013-12-04 10:56 yunsicai 阅读(333) 评论(0) 推荐(0)
摘要: Log4cplus使用¶1.1 简介log4cplus是C++编写的开源日志系统,前身是java编写的log4j日志系统。log4cplus具有线程安全、灵活、以及多粒度控制的特点,通过将信息划分优先级使其可以面向程序调试、运行、测试、和维护等全生命周期; 你可以选择将信息输出到屏幕、文件、NT event log、甚至是远程服务器;通过指定策略对日志进行定期备份等等。最新版本可以从"http://log4cplus.sourceforge.net"下载log4cplus-x.x.x。1.2 LOG4CPLUS的安装1.2.1 Linux下安装①使用 tar xv 阅读全文
posted @ 2013-11-28 17:07 yunsicai 阅读(2225) 评论(0) 推荐(0)
摘要: 示例程序:#include#includeusing namespace std ;class StudentT{public : int id ; string name ;public : StudentT ( int _id , string _name ) : id ( _id ), name ( _name ) { } int getId () { return id ; } string getName () { return name ; }};inline bool operator st ; StudentT s1 ( 0 , "Tom" ); Stude 阅读全文
posted @ 2013-10-25 12:23 yunsicai 阅读(9060) 评论(0) 推荐(0)
摘要: 如果select调用中设置了等待时间,那么每次调用时都需要重新对这个时间赋值。例如:struct timval tv;while(1) { ........;tv.tv_sec = 2; tv.tv_usec = 0; select(maxfd+1, &readfd, NULL, NULL, &tv);}传的是一个引用进去,select里面可能会改变这个地址里保存的内容。所以每次循环都必须重新赋值------------------------------ 将时间的初始化放在外边,时间初始化为2秒,假设在1秒后发上了事件,则select将会返回并将tv的时间变成上次阻塞的剩余时 阅读全文
posted @ 2013-10-22 10:59 yunsicai 阅读(540) 评论(0) 推荐(0)
摘要: 一:打印机1、Slice定义:interfacePrinter{voidprintString(strings);};我们的Slice定义含有一个接口,叫作Printer。目前,我们的接口非常简单,只提供了一个操作,叫作printString。该定义保存为Printer.ice2、要创建我们的C++应用,第一步是要编译我们的Slice定义,生成C++代理和骨架。在UNIX上,你可以这样编译定义:$slice2cppPrinter.iceslice2cpp编译器根据这个定义生成两个C++源文件:Printer.h和Printer.cpp。Printer.h头文件含有与我们的Printer接口的S 阅读全文
posted @ 2013-10-18 16:20 yunsicai 阅读(471) 评论(0) 推荐(0)
摘要: ifstream作为函数的参数要加&参考:http://www.cnblogs.com/growup/archive/2011/03/03/1971528.htmlvoid foo(ifstream ifs) {} // 编译出错void foo(ifstream&ifs) {} // 编译成功原因:stream不能被复制实现方法:Make the copy constructor and assignment operator private (like inthe "ios" example - remember members are private 阅读全文
posted @ 2013-10-17 14:17 yunsicai 阅读(683) 评论(0) 推荐(0)
摘要: 注:使用时把“user”替换为自己的账号,例如 ueapp: ssh://huang.fei@10.0.64.16:29418/jonet2_0_app_ueapp.git新的环境下需要先注册git,gerrit:git config --global user.name "wang.yonghui"(名字需要修改)git config --global user.email "wang.yonghui@jhx.com.cn"(修改邮箱)本地运行ssh-keygen 生成密钥之后,将公钥copy到gerrit另外为了能向gerrit进行提交,需要安装gi 阅读全文
posted @ 2013-10-16 14:51 yunsicai 阅读(6438) 评论(0) 推荐(0)
摘要: find命令详解来源: ChinaUnix博客 日期: 2008.07.25 16:04 (共有条评论)我要评论[url=http://www.sudu.cn/web/host.php][/url]用法总结如下:find pathname -options [-print -exec -ok]pathname:查找路径-option:主要选项如下:-name:按照文档名称查找-perm:按照文档权限查找-prune:不在当前指定的路径查找。假如同时指定了-depth选项,则prune被忽略-user:按照文档属主查找-group:按照文档属组查找-mtime -n +n:按照文档更改时间查找. 阅读全文
posted @ 2013-10-10 10:29 yunsicai 阅读(305) 评论(0) 推荐(0)