10 2016 档案

摘要:#include #include #include void fun1(char** s);void fun2(char** s);void fun3(char** s);void fun1(char** s){ char* _s = *s; *s = (char*)malloc(sizeof(c... 阅读全文
posted @ 2016-10-25 15:44 洛笔达 阅读(415) 评论(0) 推荐(0) 编辑
摘要:1. core文件生成打开方式: ulimit -c unlimited echo "1" > /proc/sys/kernel/core_uses_pid 看下服务器上是否安装了 gdb,没有的话要装一下 以调试模式打开程序 ./sip_gw -t2 -n 1 之后程序会crashed, 程序目录 阅读全文
posted @ 2016-10-25 10:11 洛笔达 阅读(6761) 评论(0) 推荐(0) 编辑
摘要:1. error: ‘for’ loop initial declarations are only allowed in C99 mode 这是因为gcc基于c89标准,换成C99标准就可以在for循环内定义i变量了: gcc src.c -std=c99 -o src 2. cpp引用.c文件 阅读全文
posted @ 2016-10-14 09:35 洛笔达 阅读(1271) 评论(0) 推荐(0) 编辑
摘要:生成可执行文件 g++ mutiprocess.cpp -o test-fpic:产生位置无关码,位置无关码就是可以在进程的任意内存位置执行的目标码,动态链接库必须使用-c : 只生成 .o 文件-o : 生成可执行文件-g : 生成可调试文件 -lworld表示libworld.so动态库文件... 阅读全文
posted @ 2016-10-08 17:11 洛笔达 阅读(715) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示