`

Linux下C语言编程环境的工具

阅读更多
要想在Linux下进行C语言编程,首先得搭建好一个编程环境。这里分别说明一下几个非常有用的软件包。
如果你对Linux下软件安装方法还不清楚,请参考文章“Linux下软件安装方法总结”http://zhoulifa.bokee.com/5444771.html
1、gcc
要进行C语言编程,首先得有个C语言的编译器,Linux下常用的是GNU C Compiler gcc。软件包的信息如下:
Package: gcc
Priority: optional
Section: devel
Installed-Size: 64
Maintainer: Ubuntu Core Developers <ubuntu-devel@lists.ubuntu.com>
Original-Maintainer: Debian GCC Maintainers <debian-gcc@lists.debian.org>
Architecture: i386
Source: gcc-defaults (1.41ubuntu3)
Version: 4:4.1.1-6ubuntu3
Provides: c-compiler
Depends: cpp (>= 4:4.1.1-6ubuntu3), gcc-4.1 (>= 4.1.1-2)
Recommends: libc6-dev | libc-dev
Suggests: make, manpages-dev, autoconf, automake1.9, libtool, flex, bison, gdb, gcc-doc
Conflicts: gcc-doc (<< 1:2.95.3)
Filename: pool/main/g/gcc-defaults/gcc_4.1.1-6ubuntu3_i386.deb
Size: 5148
MD5sum: 50de0a13f56c9ac41f85ea7fcabde0b2
SHA1: c29cc1ea61d536d8ecb024fac83222c935a2703e
SHA256: 65103d0dbc2c7508184ac177a8ea5eb90a82d873b0fb7fd65b9764b691673708
Description: The GNU C compiler
This is the GNU C compiler, a fairly portable optimizing compiler for C.
.
This is a dependency package providing the default GNU C compiler.
Bugs: mailto:ubuntu-users@lists.ubuntu.com
Origin: Ubuntu
Task: ubuntu-desktop, kubuntu-desktop, xubuntu-desktop
我们从上面可以看出这个gcc软件是用来提供默认值的。从Depends可以看出要gcc真正工作必须有对应的cpp和gcc版本。
比如cpp-4.1和gcc-4.1、cpp-3.3和gcc-3.4

2、gcc-*
这里以gcc-4.1版本为例,该软件包信息如下:
Package: gcc-4.1
Priority: optional
Section: devel
Installed-Size: 1456
Maintainer: Ubuntu Core Developers <ubuntu-devel@lists.ubuntu.com>
Original-Maintainer: Debian GCC Maintainers <debian-gcc@lists.debian.org>
Architecture: i386
Version: 4.1.1-13ubuntu5
Replaces: gcj-4.1 (<< 4.1.1), libssp0-dev (<< 4.1.1-6)
Provides: c-compiler, libssp0-dev
Depends: gcc-4.1-base (= 4.1.1-13ubuntu5), cpp-4.1 (= 4.1.1-13ubuntu5), binutils (>= 2.16.1cvs20051214), libgcc1 (>= 1:4.1.1-13ubuntu5), libc6 (>= 2.4-1)
Recommends: libc6-dev (>= 2.3.6-7), libmudflap0-dev (>= 4.1.1-13ubuntu5)
Suggests: gcc-4.1-doc (>= 4.1.1), gcc-4.1-locales (>= 4.1.1), libc6-dev-amd64, lib64gcc1 (>= 1:4.1.1-13ubuntu5)
Conflicts: gcj-4.1 (<< 4.1.1), libssp0-dev (<< 4.1.1-6)
Filename: pool/main/g/gcc-4.1/gcc-4.1_4.1.1-13ubuntu5_i386.deb
Size: 609694
MD5sum: 522696065e5152e9b8f2fe0c637340eb
SHA1: 3d7fedaccdd6180684849571f15bf75cc8cf0a56
SHA256: e77e3ed94f79d2bd6145fed9446c6216eb7c35a7a0e94148ae9f6d2f7c18d52e
Description: The GNU C compiler
This is the GNU C compiler, a fairly portable optimizing compiler for C.
Bugs: mailto:ubuntu-users@lists.ubuntu.com
Origin: Ubuntu
Task: ubuntu-desktop, kubuntu-desktop, xubuntu-desktop

3、cpp
gcc要进行程序编译,首先需要进行一个预编译过程。该过程对程序源代码进行预处理。
cpp软件包的信息如下:
Package: cpp
Priority: optional
Section: interpreters
Installed-Size: 96
Maintainer: Ubuntu Core Developers <ubuntu-devel@lists.ubuntu.com>
Original-Maintainer: Debian GCC Maintainers <debian-gcc@lists.debian.org>
Architecture: i386
Source: gcc-defaults (1.41ubuntu3)
Version: 4:4.1.1-6ubuntu3
Depends: cpp-4.1 (>= 4.1.1-2)
Suggests: cpp-doc
Conflicts: cpp-doc (<< 1:2.95.3)
Filename: pool/main/g/gcc-defaults/cpp_4.1.1-6ubuntu3_i386.deb
Size: 31172
MD5sum: 1d16eb3da2478b7ded37d185968237b0
SHA1: 688cc7572783577825c5430252b04da31977c129
SHA256: a75d7c4446f45e94ec947307d90cf2776441baa78cd511192128e6cb1108f6a2
Description: The GNU C preprocessor (cpp)
The GNU C preprocessor is a macro processor that is used automatically
by the GNU C compiler to transform programs before actual compilation.
.
This package has been separated from gcc for the benefit of those who
require the preprocessor but not the compiler.
.
This is a dependency package providing the default GNU C preprocessor.
Bugs: mailto:ubuntu-users@lists.ubuntu.com
Origin: Ubuntu
Task: ubuntu-desktop, kubuntu-desktop, edubuntu-desktop, xubuntu-desktop

4、cpp-*
这里以cpp-4.1为例,软件包信息如下:
Package: cpp-4.1
Priority: optional
Section: interpreters
Installed-Size: 5196
Maintainer: Ubuntu Core Developers <ubuntu-devel@lists.ubuntu.com>
Original-Maintainer: Debian GCC Maintainers <debian-gcc@lists.debian.org>
Architecture: i386
Source: gcc-4.1
Version: 4.1.1-13ubuntu5
Replaces: gcj-4.1 (<< 4.1.1)
Depends: gcc-4.1-base (= 4.1.1-13ubuntu5), libc6 (>= 2.4-1)
Suggests: gcc-4.1-locales (>= 4.1.1)
Conflicts: gcj-4.1 (<< 4.1.1)
Filename: pool/main/g/gcc-4.1/cpp-4.1_4.1.1-13ubuntu5_i386.deb
Size: 2309026
MD5sum: abfee8be3d7aeb0ad3eb4e7738838dca
SHA1: 8a51c79c2b961686b98617772b9da4800f173dbe
SHA256: 115aad59c02eee574066e21e6ed7a32bee1ed86e3abb73189645928832258ea0
Description: The GNU C preprocessor
A macro processor that is used automatically by the GNU C compiler
to transform programs before actual compilation.
.
This package has been separated from gcc for the benefit of those who
require the preprocessor but not the compiler.
Bugs: mailto:ubuntu-users@lists.ubuntu.com
Origin: Ubuntu
Task: ubuntu-desktop, kubuntu-desktop, edubuntu-desktop, xubuntu-desktop

5、libgcc1
gcc还依赖于libgcc1这个软件包。libgcc1是用于gcc软件自身的必须组件。软件包信息如下:
Package: libgcc1
Priority: required
Section: libs
Installed-Size: 68
Maintainer: Ubuntu Core Developers <ubuntu-devel@lists.ubuntu.com>
Original-Maintainer: Debian GCC Maintainers <debian-gcc@lists.debian.org>
Architecture: i386
Source: gcc-4.1 (4.1.1-13ubuntu5)
Version: 1:4.1.1-13ubuntu5
Depends: gcc-4.1-base (= 4.1.1-13ubuntu5), libc6 (>= 2.4-1)
Filename: pool/main/g/gcc-4.1/libgcc1_4.1.1-13ubuntu5_i386.deb
Size: 21404
MD5sum: 879959bc964403be55aa096a8bb269f9
SHA1: 3a3cfd824e25a2ce9008d98da1269f5ffdb7507f
SHA256: 62f3f64daaa1dd19fc76d966718184d1e0e0ee9f733f7f955b8b09e27b69a7d1
Description: GCC support library
Shared version of the support library, a library of internal subroutines
that GCC uses to overcome shortcomings of particular machines, or
special needs for some languages.
Bugs: mailto:ubuntu-users@lists.ubuntu.com
Origin: Ubuntu
Task: minimal

6、libc6
C语言程序要能够运行,需要一些运行时库文件和一些库文件操作命令。libc6这个软件包就是用来提供这些的。这个软件包几乎是Linux系统自带的,因为所有C程序的运行都离不开此软件包。软件包信息如下:
Package: libc6
Priority: required
Section: base
Installed-Size: 9992
Maintainer: Ubuntu Core Developers <ubuntu-devel@lists.ubuntu.com>
Original-Maintainer: GNU Libc Maintainers <debian-glibc@lists.debian.org>
Architecture: i386
Source: glibc
Version: 2.4-1ubuntu12.3
Replaces: ldso (<= 1.9.11-9), timezone, timezones, gconv-modules, libtricks, libc6-bin, netkit-rpc, netbase (<< 4.0)
Provides: glibc-2.3.6-2, glibc-2.3.5-3
Depends: locales (>= 2.3.11)
Suggests: locales, glibc-doc
Conflicts: strace (<< 4.0-0), libnss-db (<= 2.2-6.1.1), timezone, timezones, gconv-modules, libtricks, libc6-doc, libc5 (<< 5.4.33-7), libpthread0 (<< 0.7-10), libc6-bin, libwcsmbs, apt (<< 0.3.0), libglib1.2 (<< 1.2.1-2), netkit-rpc, wine (<< 0.0.20031118-1), cyrus-imapd (<< 1.5.19-15), e2fsprogs (<< 1.35-7), initrd-tools (<< 0.1.84.1), libterm-readline-gnu-perl (<< 1.15-2)
Filename: pool/main/g/glibc/libc6_2.4-1ubuntu12.3_i386.deb
Size: 4129182
MD5sum: 012994de4fa9093d6fdba6c2304ddb9a
SHA1: 187b850b1ac6153838ae2c1f8518342325ffe2ca
SHA256: 6ad0ee8cccb09117df4f6c02a275940b8bb27883219b205cad1840ccf870a790
Description: GNU C Library: Shared libraries
Contains the standard libraries that are used by nearly all programs on
the system. This package includes shared versions of the standard C library
and the standard math library, as well as many others.
Bugs: mailto:ubuntu-users@lists.ubuntu.com
Origin: Ubuntu
Task: minimal

7、binutils
程序从源代码到可执行程序的过程中,必然需要一些工具来辅助完成。binutils软件包就是提供一些工具的,软件包信息如下:
Package: binutils
Priority: optional
Section: devel
Installed-Size: 7076
Maintainer: James Troup <james@nocrew.org>
Architecture: i386
Version: 2.17-1ubuntu1
Provides: elf-binutils
Depends: libc6 (>= 2.4-1)
Suggests: binutils-doc (= 2.17-1ubuntu1)
Conflicts: gas, elf-binutils, modutils (<< 2.4.19-1)
Filename: pool/main/b/binutils/binutils_2.17-1ubuntu1_i386.deb
Size: 1440506
MD5sum: e9ae8f7ad19ce94dbfb2d96c3023941b
SHA1: 58bb97665e26785b1667f9d988443b9719c57bea
SHA256: 43c9ee10660b853deea247c21c5ad61d5d184e6b13484eb6c6cd696d17eae31e
Description: The GNU assembler, linker and binary utilities
The programs in this package are used to assemble, link and manipulate
binary and object files. They may be used in conjunction with a compiler
and various libraries to build programs.
Bugs: mailto:ubuntu-users@lists.ubuntu.com
Origin: Ubuntu
Task: ubuntu-desktop, kubuntu-desktop, edubuntu-server, xubuntu-desktop
这个软件包提供下面这些非常有用的命令:
/usr/bin/size # 显示每个目标文件或归档文件的章节大小和总的大小
/usr/bin/objdump # 显示目标文件的信息
/usr/bin/ar # 归档文件管理工具,可以创建、修改或打开一个归档文件
/usr/bin/strings # 显示一个文件中的可打印字符串,比如文本文件的全部或目标文件里的字符串
/usr/bin/ranlib # 产生归档文件的索引
/usr/bin/objcopy # 复制或转换目标文件
/usr/bin/addr2line # 把一个地址信息转换为文件名和行号
/usr/bin/readelf # 显示 ELF 文件信息, ELF 文件格式即 Linux 目前流行的可执行文件格式
/usr/bin/nm # 显示目标文件里的符号
/usr/bin/strip # 去除目标文件里的符号
/usr/bin/c++filt # 识别 C++ 和 Java 符号
/usr/bin/as # GNU 汇编工具
/usr/bin/gprof #
/usr/bin/ld # GNU 链接工具

8、locales
这个软件包提供本地语言环境支持,软件包信息如下:
Package: locales
Priority: required
Section: base
Installed-Size: 7284
Maintainer: Martin Pitt <martin.pitt@ubuntu.com>
Architecture: all
Source: langpack-locales
Version: 2.3.22
Replaces: belocs-locale-data, base-config, libc6 (<< 2.3.6-0ubuntu6), libc6.1 (<< 2.3.6-0ubuntu6)
Depends: belocs-locales-bin (>= 2.4), tzdata
Conflicts: belocs-locale-data, base-config
Filename: pool/main/l/langpack-locales/locales_2.3.22_all.deb
Size: 3023314
MD5sum: bfc03e46a01addb754b9ea03979c3458
SHA1: 219943450cf30851870b89cabe766da04b4cdff3
SHA256: fe9345e58e70db1c8c6e798f40a07d988f2d4c5de4408e9c8ac3db87d99fbe24
Description: common files for locale support
This package provides support for localized environments (locales).
It installs character and transliteration maps, provides the POSIX
locale definition and provides common scripts for language pack
handling.
.
The actual locale definitions are not part of this package, these are
shipped in the language packs and are installed and removed
automatically.
Bugs: mailto:ubuntu-users@lists.ubuntu.com
Origin: Ubuntu
Task: minimal

虽然上面列了这么多必需的软件包,但实际上因为他们之间有依赖关系,所以在安装完系统后我们只需要输入下面一个命令:
apt-get install gcc
系统就会自动帮忙把这些软件包安装上。

/************关于本文档********************************************
*filename: 我是这样学习Linux下C语言编程的-Linux下C语言编程环境的搭建
*purpose: 列出Linux下C语言编程者必备的几个软件包
*wrote by: zhoulifa(zhoulifa@163.com) 周立发(http://zhoulifa.bokee.com)
Linux爱好者 Linux知识传播者 SOHO族 开发者 最擅长C语言
*date time:2007-02-09 18:20
*Note: 任何人可以任意复制代码并运用这些文档,当然包括你的商业用途
* 但请遵循GPL
*Thanks to:Ubuntu
*Hope:希望越来越多的人贡献自己的力量,为科学技术发展出力
* 科技站在巨人的肩膀上进步更快!感谢有开源前辈的贡献!
*********************************************************************/

9、libc6-dev
我们要进行软件开发,必然需要一些库文件和头文件,在Linux常用的就是GNU的C语言库libc,要安装开发工具必须安装这个libc6-dev软件包,信息如下:
Package: libc6-dev
Priority: optional
Section: libdevel
Installed-Size: 7872
Maintainer: Ubuntu Core Developers <ubuntu-devel@lists.ubuntu.com>
Original-Maintainer: GNU Libc Maintainers <debian-glibc@lists.debian.org>
Architecture: i386
Source: glibc
Version: 2.4-1ubuntu12.3
Replaces: man-db (<= 2.3.10-41), gettext (<= 0.10.26-1), ppp (<= 2.2.0f-24), libgdbmg1-dev (<= 1.7.3-24), ldso (<= 1.9.11-9), netkit-rpc, netbase (<< 4.0), kerberos4kth-dev (<< 1.2.2-10), libc6-prof (<< 2.3.5-2)
Provides: libc-dev
Depends: libc6 (= 2.4-1ubuntu12.3), linux-libc-dev
Recommends: gcc | c-compiler
Suggests: glibc-doc, manpages-dev
Conflicts: libstdc++2.10-dev (<< 1:2.95.2-15), gcc-2.95 (<< 1:2.95.3-9), libpthread0-dev, libdl1-dev, libdb1-dev, libgdbm1-dev, libc6-dev (<< 2.0.110-1), locales (<< 2.1.3-5), libstdc++2.9-dev, netkit-rpc, libc-dev
Filename: pool/main/g/glibc/libc6-dev_2.4-1ubuntu12.3_i386.deb
Size: 1851740
MD5sum: 3d251ab59720128c3d95e427649e1528
SHA1: a80d219c65eb3f9f78be17dd3cd0f0017fbb0f78
SHA256: a2b0869b9b732aa56f9108849960e9f72b13bbe76bf58d8af7965c937bdaea0a
Description: GNU C Library: Development Libraries and Header Files
Contains the symlinks, headers, and object files needed to compile
and link programs which use the standard C library.
Bugs: mailto:ubuntu-users@lists.ubuntu.com
Origin: Ubuntu
Task: kubuntu-desktop

10、glibc-doc
进行C语言开发过程中必须遇到一些问题需要参考一下GNU的文档,一种方法当然是去gnu.org,但如果上不了网呢?就最好把这个软件包glibc-doc安装上,此软件包信息如下:
Package: glibc-doc
Priority: optional
Section: doc
Installed-Size: 1980
Maintainer: Ubuntu Core Developers <ubuntu-devel@lists.ubuntu.com>
Original-Maintainer: GNU Libc Maintainers <debian-glibc@lists.debian.org>
Architecture: all
Source: glibc
Version: 2.4-1ubuntu12.3
Suggests: glibc-doc-reference
Filename: pool/main/g/glibc/glibc-doc_2.4-1ubuntu12.3_all.deb
Size: 1680960
MD5sum: e09fe50c81afb02bfe577b7547003b00
SHA1: cf1c532ca23feecd7460551e81a2b95377f733be
SHA256: 467046a205269c2524a1c49bc8e42634a535a04489064c3ceb5f80a03cc18d27
Description: GNU C Library: Documentation
Contains man pages for libpthread functions and the complete GNU C Library
ChangeLog. The GNU C Library Reference manual has been moved into
glibc-doc-reference for licensing reasons.
Bugs: mailto:ubuntu-users@lists.ubuntu.com
Origin: Ubuntu

11、glibc-doc-reference
理由同上,编程人员最喜欢的参考手册就是这个软件包了,可以称为Linux下C语言编程参考。此软件包信息如下:
Package: glibc-doc-reference
Priority: optional
Section: doc
Installed-Size: 7876
Maintainer: GNU Libc Maintainers <debian-glibc@lists.debian.org>
Architecture: all
Version: 2.3.6-1
Conflicts: glibc-doc (<< 2.3.6.ds1-1)
Filename: pool/main/g/glibc-doc-reference/glibc-doc-reference_2.3.6-1_all.deb
Size: 1984636
MD5sum: a08b8df52dc2bf1dd99c54bb1f0d5b24
SHA1: eac497f4a91046ed491a5ca45d640f7964779b1e
SHA256: ebb3a2a78ae3f6a6d7a7f24a6a7e8db89a8af5eae0e5d0523a0329621378c79a
Description: GNU C Library: Documentation
Contains The GNU C Library Reference manual in info and html format.
Bugs: mailto:ubuntu-users@lists.ubuntu.com
Origin: Ubuntu
此参考手册有html和info两种格式,你可以用浏览器打开/usr/share/doc/glibc-doc-reference/html目录下的手册一页页看。把这里每个网页一点点看完了学会了基本上没有搞不定的问题了。

12、manpages-dev
在编程的过程中有时会记不得某个函数的用法,通常这时查man手册是比较快的,所以把这个manpages-dev软件包安装上。想要看某个函数的用法就man它。软件包信息如下:
Package: manpages-dev
Priority: optional
Section: doc
Installed-Size: 2908
Maintainer: Martin Schulze <joey@debian.org>
Architecture: all
Source: manpages
Version: 2.34-1
Replaces: glibc-doc (<< 2.3.6-8)
Depends: manpages
Suggests: man-browser
Filename: pool/main/m/manpages/manpages-dev_2.34-1_all.deb
Size: 1212216
MD5sum: 0edb841a2ab4f5a821e5e9c64d32f6f2
SHA1: 6b5939fa8ce076b90b7284323dabd78b9dec3c37
SHA256: 42757735e4e8257e4569ea83cebbb05d7eda094bd9fb67c227f26179365ce610
Description: Manual pages about using GNU/Linux for development
These man pages describe the Linux programming interface, including
these two sections:
2 = Linux system calls.
3 = Library calls (note that a more comprehensive source of information
      may be found in the glibc-doc package).
Bugs: mailto:ubuntu-users@lists.ubuntu.com
Origin: Ubuntu
这个软件包提供系统调用和库函数的在线手册。

13、make
在进行大项目时,通常我们的程序可能是由很多源文件组成的,各个源文件生成自己的目标文件,多个目标文件才链接形成一个新的目标文件或可执行程序。
在某个源文件发生变化时,我们只需要按照这种依赖关系运行各命令重新生成程序即可,而不需要对所有源文件重新编译。哪个该重新编译呢?可以让make程序帮忙 维护,该软件包信息如下:
Package: make
Priority: optional
Section: devel
Installed-Size: 1200
Maintainer: Manoj Srivastava <srivasta@debian.org>
Architecture: i386
Source: make-dfsg
Version: 3.81-2
Depends: libc6 (>= 2.4-1)
Suggests: make-doc-non-dfsg
Filename: pool/main/m/make-dfsg/make_3.81-2_i386.deb
Size: 148054
MD5sum: 818d9b86d322629e5f218e8a101157c9
SHA1: b5a04fd649b418b689c4918f17b5d94d01b11c5d
SHA256: 6dc9467599278802a34c2a7ee9125a7f4b42719fcc8fdab8124bde7db80c5328
Description: The GNU version of the "make" utility.
GNU Make is a program that determines which pieces of a large
program need to be recompiled and issues the commands to recompile
them, when necessary. More information about GNU Make can be found in
the `make' Info page. The upstream sources for this package are
available at the location ftp://ftp.gnu.org/gnu/make/. The
documentation for this package does not meet the Debian Free Software
Guidelines, and has been removed from this package.
Bugs: mailto:ubuntu-users@lists.ubuntu.com
Origin: Ubuntu
Task: ubuntu-desktop, kubuntu-desktop, xubuntu-desktop

14、make-doc
要运行make工具,先得学会怎么用它吧?看这个软件包提供的文档就行了。此软件包信息如下:
Package: make-doc
Priority: optional
Section: doc
Installed-Size: 1884
Maintainer: Manoj Srivastava <srivasta@debian.org>
Architecture: all
Source: make-doc-non-dfsg
Version: 3.81-3
Replaces: make (<< 3.80+3.81.rc2-1)
Suggests: make
Filename: pool/main/m/make-doc-non-dfsg/make-doc_3.81-3_all.deb
Size: 781784
MD5sum: 9e5fae427052c555b318d762e579b864
SHA1: 883119ca2161a0855f67f48a4bb521777adbf1c3
SHA256: 9d6c4846f812e4336da503ac77c8e667f45a1d861484d2ecd21b6d354abb9ab7
Description: Documentation for the GNU version of the "make" utility.
This package contains the documentation for GNU Make. The upstream
sources for this package are available at the location
ftp://ftp.gnu.org/gnu/make/. This package has been stripped down to
only contain the documentation; since the documentation is covered
under a non-free license and thus has been moved to
non-free/doc. Make itself remains in Debian.
Enhances: make
Bugs: mailto:ubuntu-users@lists.ubuntu.com
Origin: Ubuntu
安装好这个软件包后,用浏览器打开/usr/share/doc/make-doc/make.html文档开始学习make的用法吧。

15、gdb
编写程序必然需要调试,在Linux常用的程序调试工具是gdb,此软件包信息如下:
Package: gdb
Priority: optional
Section: devel
Installed-Size: 5108
Maintainer: Ubuntu Core Developers <ubuntu-devel@lists.ubuntu.com>
Original-Maintainer: Daniel Jacobowitz <dan@debian.org>
Architecture: i386
Version: 6.4.90.dfsg-1ubuntu3
Replaces: gdb-arm, insight (<< 6.1+cvs.2004.04.07-1)
Depends: libc6 (>= 2.4-1), libncurses5 (>= 5.4-5), libreadline5 (>= 5.1)
Suggests: gdb-doc
Conflicts: gdb-arm
Filename: pool/main/g/gdb/gdb_6.4.90.dfsg-1ubuntu3_i386.deb
Size: 2371532
MD5sum: c3483bd4246e5a15e1a940d4b907c45e
SHA1: 986b32bde241bef04e3e61a3fbe74e16f32b526a
SHA256: 69adcb23c8be1e0a50bb59f916a32a7da90836b02e08d2ca84e8ae63fad2fc01
Description: The GNU Debugger
GDB is a source-level debugger, capable of breaking programs at
any specific line, displaying variable values, and determining
where errors occurred. Currently, it works for C, C++, Fortran,
Modula 2 and Java programs. A must-have for any serious
programmer.
Bugs: mailto:ubuntu-users@lists.ubuntu.com
Origin: Ubuntu
Task: ubuntu-desktop, kubuntu-desktop, edubuntu-desktop

16、gdb-doc
有了上面的gdb程序调试工具了,怎么学会使用它呢?安装这个软件包gdb-doc,即gdb的文档,此软件包信息如下:
Package: gdb-doc
Priority: optional
Section: devel
Installed-Size: 564
Maintainer: Daniel Jacobowitz <dan@debian.org>
Architecture: all
Version: 6.4.90-1
Replaces: gdb (<< 6.4.50.20060511-1), insight (<< 6.1+cvs.2004.04.07-1)
Filename: pool/main/g/gdb-doc/gdb-doc_6.4.90-1_all.deb
Size: 484948
MD5sum: 2c6d45390c4963aefbb0abbe5983042b
SHA1: 58dd65a6891b2c138a996dbb457cafa17b1bb616
SHA256: 3ff50b17e18efa4a6fb1803144e203e8dd11de12314c79fbf8402fe057ca4e98
Description: The GNU Debugger Documentation
GDB is a source-level debugger, capable of breaking programs at
any specific line, displaying variable values, and determining
where errors occurred. Currently, it works for C, C++, Fortran,
Modula 2 and Java programs. A must-have for any serious
programmer.
.
This package contains the GDB and GDB Internals manuals.
Bugs: mailto:ubuntu-users@lists.ubuntu.com
Origin: Ubuntu
安装好软件后就可以通过电脑上的文档自学gdb的使用了。

17、编辑器
要编写C程序,总得有个编辑工具吧?Linux下这类工具相当多,关键在于熟练掌握一种。
比如文本界面的编辑器vi, vim, emacs等
比如图形界面的编辑器gedit, kate, kwrite等
又比如IDE环境的:anjuta, eclipse, kdevelop等

选择一个自己习惯的熟练使用起来就行了。

这些只是基本的Linux下C编程环境必须的软件包。如果这些熟练掌握了,可以试试下面这些软件包:
autoconf, automake1.9, libtool, flex, bison
当然还有对应的文档用于自学。
甚至可以试试IDE环境下其它语言编程,比如gtk, qt等
分享到:
评论

相关推荐

    Linux下c语言编程书籍资料

    资料分两部分:1、如何在Linux下安装和使用GUN C的编译器GCC; 2、Make程序维护工具

    西南科技大学+Linux实验报告+Linux环境下C语言编程

    2.基本掌握Linux字符模式下的编译工具和调试工具的使用 3.掌握自动编译工具make的使用和Makefile的编写方法 二、实验设计 1.GCC使用方法 2.调试器GDB使用方法(选做) 3.编译配置工具Make工具使用 4.Linuxer编译...

    Linux下C语言编程概述

    Linux下的C语言程序设计与在其他环境中的C程序设计一样,主要涉及到编辑器、编译链接器、调试器及项目管理工具。 (1)编辑器  Linux下的编辑器就如Windows下的word、记事本等一样,完成对所录入文字的编辑...

    嵌入式Linux上的C语言编程实践

    1.1 Linux下的C语言开发环境 第1章 Linux环境下C语言的开发 。。。 第5章 make工程管理工具 。。。 第13章 C语言程序的内存布局 。。。

    linux局域网聊天工具(附带文档和源码参考)

    2.2 熟悉Linux操作系统下的C/C++应用程序开发环境,掌握linux系统下开发工具vi、gcc 和gdb的使用,以及makefile的写法; 2.3 掌握Linux环境下图形工具包GTK和网络编程中socket“套接字”的使用;

    Linux编程入门之C语言环境

    主要讲述 Linux 平台上的 C 语言环境,包括编译器、 调试器、Make、Diff、Patch 等。其目的是通过介绍 Linux 上 C 语言编程的基本工具 以及一些新手必须掌握的技巧,迅速引导新手入门,以避免走弯路。

    Linux操作系统C语言编程(pdf)

    目 录 第一章 基础知识 第二章 进程介绍 第三章 文件操作 第四章 时间概念 第五章 信号处理 第六章 消息管理 第七章 线程操作 第八章 网络编程 第九章 Linux下 C 开发工具介绍

    Linux环境编程 实验3.doc

    根据实验指导书的要求和步骤,完成相应的程序开发及多模块软件编译与链接过程,并在Linux环境下,完成程序开发及软件剖析。 一、实验目的: 1)掌握MYSQL数据库命令与应用编程。 2)了解Linux多模块软件编译与链接...

    精通LINUX下的C编程(配套光盘)第三部分

    第2章 Linux下的C语言编程环境 2.1 Linux编程简介 2.2 Linux下的C语言开发环境 2.3 编辑器的使用 2.4 编译器gcc的使用 2.5 LinuxC程序的开发过程 2.6 make工具及其使用 2.7 使用autoconf 2.8 使用automake ...

    LINUX上的C编程

    第二部分讲述了Linux系统的C编程环境,详细讲述了Linux下C语言编译器(如GCC)、调试工具(如GDB)和程序自动维护工具的使用方法。第三部分详细介绍Linux的系统调用。最后,是一个实现shell简单功能的命令解释器的实例。...

    开源软件丛书 LINUX上的C编程第二部分

    第二部分讲述了Linux系统的C编程环境,详细讲述了Linux下C语言编译器(如GCC)、调试工具(如GDB)和程序自动维护工具的使用方法。第三部分详细介绍Linux的系统调用。最后,是一个实现shell简单功能的命令解释器的实例。...

    精通LINUX下的C编程(配套光盘)第二部分

    第2章 Linux下的C语言编程环境 2.1 Linux编程简介 2.2 Linux下的C语言开发环境 2.3 编辑器的使用 2.4 编译器gcc的使用 2.5 LinuxC程序的开发过程 2.6 make工具及其使用 2.7 使用autoconf 2.8 使用automake ...

    LINUX上的C编程 pdf

    第二部分讲述了Linux系统的C编程环境,详细讲述了Linux下C语言编译器(如GCC)、调试工具(如GDB)和程序自动维护工具的使用方法。第三部分详细介绍Linux的系统调用。最后,是一个实现shell简单功能的命令解释器的实例。...

    Linux高级程序设计PPT

    Linux下C语言开发环境.ppt 02第02章 Linux下C语言开发工具.ppt 03第03章 Linux进程存储管理.ppt 04第04章 ANSI C文件管理.ppt 05第05章 POSIX文件及目录管理.ppt 06第06章 普通文件、连接文件及目录文件属性...

    精通LINUX下的C编程(配套光盘)第一部分

    第2章 Linux下的C语言编程环境 2.1 Linux编程简介 2.2 Linux下的C语言开发环境 2.3 编辑器的使用 2.4 编译器gcc的使用 2.5 LinuxC程序的开发过程 2.6 make工具及其使用 2.7 使用autoconf 2.8 使用automake ...

    Linux C程序设计王者归来Part1

     内容全面:涵盖Linux下C语言基础、开发工具、Linux系统机制和Shell编程等  讲解详细:对每个知识点都从原理、作用、语法、示例和技巧等多角度进行分析  贴近实际:对开发中经常用到的Linux进程操作、文件操作和...

    _开源软件丛书 LINUX上的C编程

    第二部分讲述了Linux系统的C编程环境,详细讲述了Linux下C语言编译器(如GCC)、调试工具(如GDB)和程序自动维护工具的使用方法。第三部分详细介绍Linux的系统调用。最后,是一个实现shell简单功能的命令解释器的实例。...

    Linux环境下——C语言聊天室项目

    本课程设计主要实现一个Linux下的局域网聊天工具的设计。该设计主要分为两部分,客户端部分和主机部分。运行服务器端程序可以和任意运行了客户端程序的主机进行通信,通信内容能够通过终端显示出来。两个部分都使用...

    Linux高级程序设计

    详细介绍了Linux下C语言开发环境、C语言开发工具、内存管理、ANSI C文件I/O管理、POSIX文件I/O管理、文件及目录管理、进程管理、 UNIX进程间通信机制、System V进程间通信、多线程编程、线程间通信机制和Linux ...

    linux编程环境

    《嵌入式Linux系统开发技术详解—基于ARM》 作者:孙纪坤 华清远见嵌入式培训中心讲师 &lt;br&gt;第三章、linux编程环境 &lt;br&gt;本章内容包括常用的Linux开发工具使用技巧和Linux编程技术。本章内容比Linux编程方面的...

Global site tag (gtag.js) - Google Analytics