`

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语言编程入门.pdf

    Linux系统下的C语言编程环境包括 GNU gcc 编译器、Emacs 编辑器、调试器等工具。这些工具可以帮助开发者快速地编写、编译和调试C语言程序。 GNU gcc 编译器是一个功能强大的编译器,它支持C语言的编译和链接。使用...

    Linux下C语言编程

    在Linux环境下进行C语言编程,需要掌握一些基本概念和工具,包括源程序的编译、Makefile的编写、程序库的链接以及程序的调试。本文将详细介绍这些内容。 首先,让我们从源程序的编译开始。在Linux中,C语言程序的...

    Linux下C语言编程教程

    ### Linux下C语言编程教程知识点概览 #### 第一章 基础知识 ...以上是对给定文件标题、描述和部分内容的详细知识点概览,涵盖了从基础知识到高级主题的广泛内容,旨在帮助读者全面掌握Linux环境下的C语言编程技能。

    linux环境C语言编程入门

    在Linux环境下进行C语言编程是许多开发者的基础技能之一,尤其对于想要深入理解操作系统与系统级编程的人员来说,这是至关重要的。"Linux环境C语言编程入门"这本书籍旨在引导初学者掌握在Linux系统中编写、编译和...

    Linux下C语言编程入门教程

    在Linux环境下进行C语言编程是许多开发者的基础技能之一。C语言是一种强大的、高效的编程语言,尤其适合系统级编程和嵌入式开发。本教程将帮助初学者了解如何在Linux操作系统中利用C语言进行编程。 首先,你需要...

    Linux下C语言应用编程(作者-杨铸)配套教学ppt

    - `11-Linux下C语言编程环境.ppt`可能涵盖了如何在Linux上设置开发环境,包括安装GCC编译器,使用Makefile进行项目管理,以及调试工具GDB的使用。 2. **文件IO编程**: - `12-文件IO编程.ppt`会讲解Linux下的文件...

    Linux下C语言编程入门教程PDF

    本教程《Linux下C语言编程入门教程》将帮助初学者掌握在Linux环境下进行C语言编程的基本技能。 首先,你需要了解Linux的基本操作,包括命令行界面(CLI)的使用。在Linux中,一切皆为文件,包括硬件设备。掌握常用...

    linux操作系统下c语言编程入门,经典总结

    #### 二、C语言编程环境搭建 在Linux下进行C语言编程,首先需要安装一个C语言编译器,最常用的是GCC(GNU Compiler Collection)。GCC不仅支持C语言,还支持C++、Objective-C、Fortran等多种编程语言。安装GCC可以...

    linux下c语言编程

    在Linux环境下进行C语言编程需要掌握一系列工具和技术,尤其是GCC编译器的使用及其各种编译选项。通过合理的使用这些选项,可以有效地提高代码质量和程序性能。此外,学会使用gdb等调试工具对于解决问题和提高编程...

    Linux下C语言应用编程-作者-杨铸-配套ppt-源代码-教学大纲

    1. “11-Linux下C语言编程环境.ppt”:讲解如何在Linux环境下设置开发环境,包括编译器的使用、调试工具的介绍以及Makefile的编写等。 2. “12-文件IO编程.ppt”:详细阐述C语言中的文件操作,如打开、读取、写入和...

    Linux下C语言编程的

    在Linux环境下进行C语言编程,你需要了解的基本工具和命令主要是GCC编译器。GCC(GNU Compiler Collection)是一个强大的开源编译器,支持多种编程语言,包括C和C++。以下是一些关于使用GCC进行C语言编程的关键知识...

    Linux下c语言编程

    在Linux环境下进行C语言编程是一项基础且重要的技能,尤其对于那些对操作系统有深入理解或希望从事系统级开发的程序员来说。Linux系统提供了丰富的工具和资源,使得C语言的开发更为高效和灵活。以下是对"Linux下...

    Linux 下C语言编程

    11. **开源社区与资源**:Linux环境下的C语言编程得益于庞大的开源社区,开发者可以通过GitHub、Stack Overflow等平台获取代码示例、寻求帮助和分享自己的项目。 通过学习这些基础知识,初学者能够逐步掌握在Linux...

    LINUX下C语言编程

    在Linux环境下进行C语言编程是一项基础且重要的技能,尤其对于那些对系统级编程或嵌入式领域感兴趣的开发者来说。Linux提供了丰富的开发工具和强大的API,使得C语言编程变得更加灵活和高效。以下是一些关于“LINUX下...

Global site tag (gtag.js) - Google Analytics