- 博客(6)
- 资源 (25)
- 收藏
- 关注
原创 Linux gcc for 循环中 i=i++ 会造成死循环问题及 ++i / i++ 汇编分析
在把 Windows 程序移植到 Linux 时遇到了死循环,最后定位到了类似这种的语句 for (i = 0; i < 1; i = i++),别问我谁写的,为什么这么写(泪目!)。根据C语言的常识, i = i++ 应该等价于 i++, Windows 上确实是这样,但 Linux 不是,这应该是编译器差异造成的。--------------------------------------- 可 i 的分割线
2014-12-31 00:14:13 3736 6
原创 gcc/g++/make 编译信息带颜色输出
如果编译一个项目错误警告太多,非常不好找,所以非常希望输出信息可以带有颜色。可是 gcc 4.9.0 之前的版本并不支持,很多情况下是不能替换编译器的,比如使用交叉编译器,也可以使用 colorgcc,但我觉得不是特别好,需要配置,如果使用Makefile还要更改编译器设置,所以我自己动手写了一个,效果还可以,源码在github上: https://github.com/china
2014-12-23 12:00:07 11464 2
转载 gcc 编译参数 -fPIC 的详解和一些问题
ppc_85xx-gcc -shared -fPIC liberr.c -o liberr.so-fPIC 作用于编译阶段,告诉编译器产生与位置无关代码(Position-Independent Code), 则产生的代码中,没有绝对地址,全部使用相对地址,故而代码可以被加载器加载到内存的任意 位置,都可以正确的执行。这正是共享库所要求的,共享库被加载时,在内存的位置不是固定的
2014-12-15 15:01:33 25958
原创 Linux C 网络编程 - 获取本地 ip 地址,mac,通过域名获取对应的 ip
获取本地 ip 地址,mac,通过域名获取对应的 ip,是网络编程可能遇到的比较常见的操作了,所以总结如下(封装了3个函数),直接上代码:#include #include #include #include #include #include #include #include #include #include #include #define MAC_S
2014-12-11 20:15:03 9489
原创 InfoQ:开放物联网大会启动筹备,(前200名)免费报名参与
开放物联网大会2014,12月18日,北京国际会议中心,现可免费报名参与(前200名,优惠码 OIOT-KYZG-VIP 即时获得免费电子票),可惜是周四,不知道大家有没有兴趣呢?报名网址:http://www.openiotcon.com/index.html(注:优惠码来自开源中国)
2014-12-08 13:17:00 1858 5
转载 Linux 硬链接与软链接的区别
首先我们需要了解linux下硬链接以及软连接的基本概念.硬链接:新建的文件是已经存在的文件的一个别名,当原文件删除时,新建的文件仍然可以使用.软链接:也称为符号链接,新建的文件以“路径”的形式来表示另一个文件,和Windows的快捷方式十分相似,新建的软链接可以指向不存在的文件.下面详细介绍一下硬链接和软连接之间的区别.1. 硬链接和原来的文件没有什么区别,而且共享
2014-12-02 17:37:55 1303
Source Insight 3.X utf8 支持插件.zip
2015-09-14
curl-7.41.0.tar.bz2
2015-04-25
libiconv-1.14.tar.gz
2015-04-25
libini-1.1.10-2.tgz
2015-04-25
jsoncpp-src-0.5.0.tar.gz
2015-04-25
ghostpdl-9.16
2015-04-25
json-c lib
2015-04-25
curl-7.42.0.tar.bz2
2015-04-25
cconv-0.6.2.tar.gz
2015-04-25
Linux内核编程.pdf
2015-02-27
unix network programming(Volume 1 • Third Edition).pdf
2014-11-27
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人