日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 运维知识 > linux >内容正文

linux

linux环境c语言实现who,Linux下C语言编程环境的搭建1

發布時間:2023/12/31 linux 27 豆豆
生活随笔 收集整理的這篇文章主要介紹了 linux环境c语言实现who,Linux下C语言编程环境的搭建1 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

Linux下C語言編程環境的搭建

關鍵詞: Linux gcc make 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

Original-Maintainer: Debian GCC Maintainers

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

Original-Maintainer: Debian GCC Maintainers

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

Original-Maintainer: Debian GCC Maintainers

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

Original-Maintainer: Debian GCC Maintainers

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

Original-Maintainer: Debian GCC Maintainers

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

Original-Maintainer: GNU Libc Maintainers

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

(iwgh)

總結

以上是生活随笔為你收集整理的linux环境c语言实现who,Linux下C语言编程环境的搭建1的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。