随笔分类 - Linux
摘要:fork进阶知识 先看一份代码:[cpp] view plain copy/* * fork_test.c * version 2 * Created on: 2010-5-29 * Author: wangth */ #include #include i...
阅读全文
摘要:您可以省去如下步骤,直接下载我编译好的: http://download.csdn.net/detail/u011258240/9710331 一、编译opencv2.4 不带contrib 1. 下载opencv源码 2. 将opencv 源码放在linux 的一个文件夹下(记得不要放在共享文件夹
阅读全文
摘要:1. core文件生成打开方式: ulimit -c unlimited echo "1" > /proc/sys/kernel/core_uses_pid 看下服务器上是否安装了 gdb,没有的话要装一下 以调试模式打开程序 ./sip_gw -t2 -n 1 之后程序会crashed, 程序目录
阅读全文
摘要: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文件
阅读全文
摘要:生成可执行文件 g++ mutiprocess.cpp -o test-fpic:产生位置无关码,位置无关码就是可以在进程的任意内存位置执行的目标码,动态链接库必须使用-c : 只生成 .o 文件-o : 生成可执行文件-g : 生成可调试文件 -lworld表示libworld.so动态库文件...
阅读全文
摘要:我们用gcc编译程序时,可能会用到“-I”(大写i),“-L”(大写l),“-l”(小写l)等参数,下面做个记录:例:gcc -o hello hello.c -I /home/hello/include -L /home/hello/lib -lworld上面这句表示在编译hello.c时:-I ...
阅读全文
摘要:# sudo tar zxvf ./jdk-7ull-linux-i586.tar.gz -C /usr/lib/jvm gzip: stdin: not in gzip formattar: Child returned status 1tar: Error is not recoverable:...
阅读全文
摘要:su -取得root权限后,gedit /etc/lightdm/lightdm.conf ,里面的内容全部改为[SeatDefaults]greeter-session=unity-greeteruser-session=ubuntugreeter-show-manual-login=trueal...
阅读全文