成长记录
文章平均质量分 59
hyiwei16
这个作者很懒,什么都没留下…
展开
-
multiple definition of...
<br />在linux下编译工程的一个模块文件是出现了n多multiple definition of...(函数名)的错误<br />解决方法如下:<br />1、为每个文件添加条件编译<br />#ifndef _文件名_H_<br />#define _文件名_H_<br />#ifdef __cplusplus<br />extern "C" {<br />#endif /* __cplusplus */<br /> <br />/**************自己的代码部分************原创 2010-10-18 16:18:00 · 1070 阅读 · 0 评论 -
编译警告
<br />1、warning: no newline at end of file<br />Unix文档的回车换行符是一个字符/n,Windows的是分别的两个/n/r,所以在Windows下编辑的最后一个字符是/r不是/n,所以编译器以为有错误。<br />解决办法:在文件最后补一个新行即可 <br /><br />2、warning: incompatible implicit declaration of built-in function memset<br />没有includ原创 2010-10-29 18:27:00 · 206 阅读 · 0 评论 -
linux乱码 函数传参
<br />1、临时解决linux乱码问题:<br /> 在命令行输入命令:LANG="en_US.UTF-8"<br /> 或者 :LANG=""<br /> <br />2、通过参数获得函数执行结果问题:<br /> 若需获取常量则需使用一维指针:*<br /> 若需获取指针则需使用二维指针:**<br />原创 2010-11-09 19:15:00 · 250 阅读 · 0 评论 -
c 读书心得
<br />养成一个好的习惯------<br />声明变量的同时进行初始化原创 2010-11-11 22:59:00 · 181 阅读 · 0 评论 -
jabberd相关
上周五jabberd各模块还运行好好的,今天来了后c2s和sm模块就突然运行不了了,基本提示有三点:1、、、、、、、、、/.pid:no such file or directory2、connection to databases failed:cannot connect to local mysql server through socket '/、、、、/mysql.socket'3、failed to initialise one or more storage drivers初步分析问题应该在m原创 2010-11-15 11:51:00 · 232 阅读 · 0 评论 -
make无法执行
<br />莫名其妙这次工程make clean和make都执行不了,提示如下:<br />make clean 提示make: **No rule to make target `clean'. Stop.<br />Make提示make: *** No targets specified and no makefile found. Stop.<br />尝试了多次,曾有一次的提示是:<br />../libtool: line 466: CDPATH: command not found<br /原创 2010-11-16 18:30:00 · 1919 阅读 · 0 评论 -
日积月累
<br />1、其它数据类型转换为字符串 <br />短整型(int) <br />itoa(i,temp,10);///将i转换 <br />为字符串放入temp中,最后一个数字表示十进制 <br />itoa(i,temp,2); ///按二进制方式转换 <br />长整型(long) <br />ltoa(l,temp,10); <br /> <br />2、字符串转换为其它数据类型 <br />strcpy(temp,"123"); <br />短整型(int)原创 2010-11-19 11:15:00 · 277 阅读 · 0 评论