文章分类 -  linux develop

摘要:Missing separate debuginfos, use: debuginfo-install glibc-2.11.2-3.i686Install: debuginfo-install glibc使用 GDB调试 Linux 软件编译开始调试之前,必须用程序中的调试信息编译要调试的程序。这样,gdb才能够调试所使用的变量、代码行和函数。如果要进行编译,请在gcc(或g++)下使用额外的'-g'选项来编译程序: gcc -g eg.c -o eg 运行gdb在 shell中,可以使用 'gdb'命令并指定程序名作为参数来运行gdb,例如 'gdb 阅读全文
posted @ 2012-06-12 15:34 alxe_yu 阅读(293) 评论(0) 推荐(0)
摘要:关于gcc、gdb 和gmake 的资料[介绍] gcc and g++分别是gnu的c& c++编译器gcc/g++在执行编译工作的时候,总共需要4步预处理(Pre-Processing)> 编译(Compling)-> 汇编(Assembling)-> 连接(Linking).1.预处理,生成.i的文件[预处理器cpp]c preprocessor gcc-Etest.c-otest.i2.将预处理后的文件编译成汇编语言,生成文件.s[编译器egcs] gcc-Stest.i-otest.s3.由汇编变为目标代码(机器代码)生成.o的文件[汇编器as] gcc-c 阅读全文
posted @ 2012-06-12 15:28 alxe_yu 阅读(204) 评论(0) 推荐(0)
摘要:Default lib and include path:GCC looks in several different places for headers. On a normal Unix system, if you do not instruct it otherwise, it will look for headers requested with #include<file> in: /usr/local/includelibdir/gcc/target/version/include/usr/target/include/usr/include#define __T 阅读全文
posted @ 2012-06-12 15:24 alxe_yu 阅读(351) 评论(0) 推荐(0)
摘要:Install man for c++yum install libstdc++-docsGNU GCC 提供了一份关于 MAN 格式的 C++ 标准库的文档,可以在其镜像点(http://gcc.gnu.org/mirrors.html)中下载。具体的路径是:libstdc++/doxygen/libstdc++-man-xxxxxx.tar.bz2,可找一个最新日期的下载。展开包之后将 man/man3 中的所有文件拷贝到系统上已经存在的一个 man/man3 目录中即可使用。可首先 man C++Intro 阅读 Introduction to the GNU libstdc++-v3 阅读全文
posted @ 2012-06-12 15:22 alxe_yu 阅读(282) 评论(0) 推荐(0)
摘要:ExampleThe following C source code snippet prints the current time to the standard output stream.#include <stdio.h>#include <time.h> int main(){ /* Obtain current time as seconds elapsed since the Epoch. */ time_t clock = time(NULL); /* Convert to local time format and print to stdout. * 阅读全文
posted @ 2012-05-24 14:32 alxe_yu 阅读(218) 评论(0) 推荐(0)
摘要:SQLite出现database disk image is malformed(11)的处理SQLite有一个很严重的缺点就是不提供Repair命令。 导致死亡提示database disk image is malformed 它的产生有很多种可能,比如,磁盘空间不足,还有就是写入数据过程中突然掉电等。 官方对产生原因的一些说明: http://www.sqlite.org/lockingv3.html#how_to_corruptsqlite my.sqlite3sqlite>PRAGMA integrity_check;获得提示*** in database main ***Pa 阅读全文
posted @ 2012-03-15 18:03 alxe_yu 阅读(377) 评论(1) 推荐(0)
摘要:要注释掉含有/**/的大段代码,可以用#if 0 ... #endif 阅读全文
posted @ 2012-01-31 14:15 alxe_yu 阅读(87) 评论(0) 推荐(0)
摘要:configure.ac (sometimes also named: configure.in) is an input file for autoconf. It contains tests that check for conditions that are likely to differ on different platforms. The tests are made by actually invoke autoconf macros.configure.ac is processed by m4 which produces ./configure. Basically, 阅读全文
posted @ 2012-01-28 01:10 alxe_yu 阅读(1164) 评论(0) 推荐(0)
摘要:1 下载libxml工具包(www.xmlsoft.org) eg、libxml2-2.7.2.tar.gz2 解压该工具包:tar -zxvf libxml2-2.7.2.tar.gz3 创建没表文件夹:mkdir /home/libxml4 进入libxml2-2.7.2根目录:cd libxml2-2.7.25 提升权限:su6 配置安装环境 sudo ./configure --prefix /home/libxml7 make工程:make8 安装:make install进入/home/libxml,将会发现bin、include、lib、share四个文件夹,OK,安装成功!运行 阅读全文
posted @ 2012-01-28 00:51 alxe_yu 阅读(557) 评论(0) 推荐(0)
摘要:Linux下makefile教程概述——什么是makefile?或许很多Winodws的程序员都不知道这个东西,因为那些Windows的IDE都为你做了这个工作,但我觉得要作一个好的和 professional的程序员,makefile还是要懂。这就好像现在有这么多的HTML的编辑器,但如果你想成为一个专业人士,你还是要了解HTML的标识的含义。特别在Unix下的软件编译,你就不能不自己写makefile了,会不会写makefile,从一个侧面说明了一个人是否具备完成大型工程的能力。因为,makefile关系到了整个工程的编译规则。一个工程中的源文件不计数,其按类型、功能、模块分别放在若干个目 阅读全文
posted @ 2012-01-28 00:38 alxe_yu 阅读(253) 评论(0) 推荐(0)
摘要:Linux下autoconf和automake使用转自:http://hi.baidu.com/liuyanqiong/blog/item/0a6f0ad9d28e1d3d32fa1c7b.html 作为Linux下的程序开发人员,一定都遇到过Makefile,用make命令来编译自己写的程序确实是很方便。一般情况下,大家都是手工写一个简单Makefile,如果要想写出一个符合自由软件惯例的Makefile就不那么容易了. 在本文中,将介绍如何使用autoconf和automake两个工具来帮助我们自动地生成符合自由软件惯例的Makefile,这样就可以象常见的GNU程序一样,只要使用“./. 阅读全文
posted @ 2012-01-28 00:34 alxe_yu 阅读(274) 评论(0) 推荐(0)