特殊:Badtitle/NS100:InstallingCompilers:修订间差异
小无编辑摘要 |
小无编辑摘要 |
||
第2行: | 第2行: | ||
{{Languages|UbuntuHelp:InstallingCompilers}} | {{Languages|UbuntuHelp:InstallingCompilers}} | ||
#title Installing Compilers | #title Installing Compilers | ||
== Installing the GNU C compiler and GNU C++ compiler == | == Installing the GNU C compiler and GNU C++ compiler == | ||
To install the '''gcc''' and '''g++''' compilers, you will need the <code><nowiki>build-essential</nowiki></code> package. This will also install '''GNU make'''. To install the manpages for '''c''' and '''c++''' development, install the <code><nowiki>manpages-dev</nowiki></code> package. | To install the '''gcc''' and '''g++''' compilers, you will need the <code><nowiki>build-essential</nowiki></code> package. This will also install '''GNU make'''. To install the manpages for '''c''' and '''c++''' development, install the <code><nowiki>manpages-dev</nowiki></code> package. | ||
== Installing the GNU Java compiler == | == Installing the GNU Java compiler == | ||
Note that GNU's Java compiler is not the same as the one developed and distributed by Sun Microsystems, and will not provide Java to the firefox browser. For that, please see [[UbuntuHelp:Java]]. To install '''gcj''', the GNU Java compiler, install the following package: <code><nowiki>gcj</nowiki></code>. | Note that GNU's Java compiler is not the same as the one developed and distributed by Sun Microsystems, and will not provide Java to the firefox browser. For that, please see [[UbuntuHelp:Java]]. To install '''gcj''', the GNU Java compiler, install the following package: <code><nowiki>gcj</nowiki></code>. | ||
'''gcj''' can be used to: | '''gcj''' can be used to: | ||
# compile .java files to bytecode (.class files). | |||
# compile .java files to a linux-executable. | |||
To install the GNU Java bytecode interpreter, you need the <code><nowiki>gij</nowiki></code> package. | To install the GNU Java bytecode interpreter, you need the <code><nowiki>gij</nowiki></code> package. | ||
To have '''gcj''' compile to executables, install libgcj6-dev (otherwise an error during compilation occurs: libgcj.spec: No such file or directory). | To have '''gcj''' compile to executables, install libgcj6-dev (otherwise an error during compilation occurs: libgcj.spec: No such file or directory). | ||
Use '''synaptic''' to install libgcj6-dev. | Use '''synaptic''' to install libgcj6-dev. | ||
== Installing the GNU Fortran compilers == | == Installing the GNU Fortran compilers == | ||
To install the GNU Fortran 77 compiler - '''g77''', you need the <code><nowiki>g77</nowiki></code> package. | To install the GNU Fortran 77 compiler - '''g77''', you need the <code><nowiki>g77</nowiki></code> package. | ||
To install the GNU Fortran 95 compiler - '''gfortran''', the package is: <code><nowiki>gfortran</nowiki></code>. | To install the GNU Fortran 95 compiler - '''gfortran''', the package is: <code><nowiki>gfortran</nowiki></code>. | ||
== Installing the GNU autotools == | == Installing the GNU autotools == | ||
To install '''autoconf''' and '''automake''', you need the <code><nowiki>autoconf</nowiki></code> and <code><nowiki>automake</nowiki></code> packages. | To install '''autoconf''' and '''automake''', you need the <code><nowiki>autoconf</nowiki></code> and <code><nowiki>automake</nowiki></code> packages. | ||
Apt-get will tell you to explicitly choose a version of automake. If, for example, you decide to use automake1.9, you need to specify the version, such as the <code><nowiki>automake1.9</nowiki></code> package. | Apt-get will tell you to explicitly choose a version of automake. If, for example, you decide to use automake1.9, you need to specify the version, such as the <code><nowiki>automake1.9</nowiki></code> package. | ||
---- | ---- | ||
[[category:CategoryDocumentation]] | [[category:CategoryDocumentation]] | ||
[[category:UbuntuHelp]] | [[category:UbuntuHelp]] |
2007年11月30日 (五) 18:02的版本
文章出处: |
{{#if: | {{{2}}} | https://help.ubuntu.com/community/InstallingCompilers }} |
点击翻译: |
English {{#ifexist: {{#if: UbuntuHelp:InstallingCompilers | UbuntuHelp:InstallingCompilers | {{#if: | :}}InstallingCompilers}}/af | • {{#if: UbuntuHelp:InstallingCompilers|Afrikaans| [[::InstallingCompilers/af|Afrikaans]]}}|}} {{#ifexist: {{#if: UbuntuHelp:InstallingCompilers | UbuntuHelp:InstallingCompilers | {{#if: | :}}InstallingCompilers}}/ar | • {{#if: UbuntuHelp:InstallingCompilers|العربية| [[::InstallingCompilers/ar|العربية]]}}|}} {{#ifexist: {{#if: UbuntuHelp:InstallingCompilers | UbuntuHelp:InstallingCompilers | {{#if: | :}}InstallingCompilers}}/az | • {{#if: UbuntuHelp:InstallingCompilers|azərbaycanca| [[::InstallingCompilers/az|azərbaycanca]]}}|}} {{#ifexist: {{#if: UbuntuHelp:InstallingCompilers | UbuntuHelp:InstallingCompilers | {{#if: | :}}InstallingCompilers}}/bcc | • {{#if: UbuntuHelp:InstallingCompilers|جهلسری بلوچی| [[::InstallingCompilers/bcc|جهلسری بلوچی]]}}|}} {{#ifexist: {{#if: UbuntuHelp:InstallingCompilers | UbuntuHelp:InstallingCompilers | {{#if: | :}}InstallingCompilers}}/bg | • {{#if: UbuntuHelp:InstallingCompilers|български| [[::InstallingCompilers/bg|български]]}}|}} {{#ifexist: {{#if: UbuntuHelp:InstallingCompilers | UbuntuHelp:InstallingCompilers | {{#if: | :}}InstallingCompilers}}/br | • {{#if: UbuntuHelp:InstallingCompilers|brezhoneg| [[::InstallingCompilers/br|brezhoneg]]}}|}} {{#ifexist: {{#if: UbuntuHelp:InstallingCompilers | UbuntuHelp:InstallingCompilers | {{#if: | :}}InstallingCompilers}}/ca | • {{#if: UbuntuHelp:InstallingCompilers|català| [[::InstallingCompilers/ca|català]]}}|}} {{#ifexist: {{#if: UbuntuHelp:InstallingCompilers | UbuntuHelp:InstallingCompilers | {{#if: | :}}InstallingCompilers}}/cs | • {{#if: UbuntuHelp:InstallingCompilers|čeština| [[::InstallingCompilers/cs|čeština]]}}|}} {{#ifexist: {{#if: UbuntuHelp:InstallingCompilers | UbuntuHelp:InstallingCompilers | {{#if: | :}}InstallingCompilers}}/de | • {{#if: UbuntuHelp:InstallingCompilers|Deutsch| [[::InstallingCompilers/de|Deutsch]]}}|}} {{#ifexist: {{#if: UbuntuHelp:InstallingCompilers | UbuntuHelp:InstallingCompilers | {{#if: | :}}InstallingCompilers}}/el | • {{#if: UbuntuHelp:InstallingCompilers|Ελληνικά| [[::InstallingCompilers/el|Ελληνικά]]}}|}} {{#ifexist: {{#if: UbuntuHelp:InstallingCompilers | UbuntuHelp:InstallingCompilers | {{#if: | :}}InstallingCompilers}}/es | • {{#if: UbuntuHelp:InstallingCompilers|español| [[::InstallingCompilers/es|español]]}}|}} {{#ifexist: {{#if: UbuntuHelp:InstallingCompilers | UbuntuHelp:InstallingCompilers | {{#if: | :}}InstallingCompilers}}/fa | • {{#if: UbuntuHelp:InstallingCompilers|فارسی| [[::InstallingCompilers/fa|فارسی]]}}|}} {{#ifexist: {{#if: UbuntuHelp:InstallingCompilers | UbuntuHelp:InstallingCompilers | {{#if: | :}}InstallingCompilers}}/fi | • {{#if: UbuntuHelp:InstallingCompilers|suomi| [[::InstallingCompilers/fi|suomi]]}}|}} {{#ifexist: {{#if: UbuntuHelp:InstallingCompilers | UbuntuHelp:InstallingCompilers | {{#if: | :}}InstallingCompilers}}/fr | • {{#if: UbuntuHelp:InstallingCompilers|français| [[::InstallingCompilers/fr|français]]}}|}} {{#ifexist: {{#if: UbuntuHelp:InstallingCompilers | UbuntuHelp:InstallingCompilers | {{#if: | :}}InstallingCompilers}}/gu | • {{#if: UbuntuHelp:InstallingCompilers|ગુજરાતી| [[::InstallingCompilers/gu|ગુજરાતી]]}}|}} {{#ifexist: {{#if: UbuntuHelp:InstallingCompilers | UbuntuHelp:InstallingCompilers | {{#if: | :}}InstallingCompilers}}/he | • {{#if: UbuntuHelp:InstallingCompilers|עברית| [[::InstallingCompilers/he|עברית]]}}|}} {{#ifexist: {{#if: UbuntuHelp:InstallingCompilers | UbuntuHelp:InstallingCompilers | {{#if: | :}}InstallingCompilers}}/hu | • {{#if: UbuntuHelp:InstallingCompilers|magyar| [[::InstallingCompilers/hu|magyar]]}}|}} {{#ifexist: {{#if: UbuntuHelp:InstallingCompilers | UbuntuHelp:InstallingCompilers | {{#if: | :}}InstallingCompilers}}/id | • {{#if: UbuntuHelp:InstallingCompilers|Bahasa Indonesia| [[::InstallingCompilers/id|Bahasa Indonesia]]}}|}} {{#ifexist: {{#if: UbuntuHelp:InstallingCompilers | UbuntuHelp:InstallingCompilers | {{#if: | :}}InstallingCompilers}}/it | • {{#if: UbuntuHelp:InstallingCompilers|italiano| [[::InstallingCompilers/it|italiano]]}}|}} {{#ifexist: {{#if: UbuntuHelp:InstallingCompilers | UbuntuHelp:InstallingCompilers | {{#if: | :}}InstallingCompilers}}/ja | • {{#if: UbuntuHelp:InstallingCompilers|日本語| [[::InstallingCompilers/ja|日本語]]}}|}} {{#ifexist: {{#if: UbuntuHelp:InstallingCompilers | UbuntuHelp:InstallingCompilers | {{#if: | :}}InstallingCompilers}}/ko | • {{#if: UbuntuHelp:InstallingCompilers|한국어| [[::InstallingCompilers/ko|한국어]]}}|}} {{#ifexist: {{#if: UbuntuHelp:InstallingCompilers | UbuntuHelp:InstallingCompilers | {{#if: | :}}InstallingCompilers}}/ksh | • {{#if: UbuntuHelp:InstallingCompilers|Ripoarisch| [[::InstallingCompilers/ksh|Ripoarisch]]}}|}} {{#ifexist: {{#if: UbuntuHelp:InstallingCompilers | UbuntuHelp:InstallingCompilers | {{#if: | :}}InstallingCompilers}}/mr | • {{#if: UbuntuHelp:InstallingCompilers|मराठी| [[::InstallingCompilers/mr|मराठी]]}}|}} {{#ifexist: {{#if: UbuntuHelp:InstallingCompilers | UbuntuHelp:InstallingCompilers | {{#if: | :}}InstallingCompilers}}/ms | • {{#if: UbuntuHelp:InstallingCompilers|Bahasa Melayu| [[::InstallingCompilers/ms|Bahasa Melayu]]}}|}} {{#ifexist: {{#if: UbuntuHelp:InstallingCompilers | UbuntuHelp:InstallingCompilers | {{#if: | :}}InstallingCompilers}}/nl | • {{#if: UbuntuHelp:InstallingCompilers|Nederlands| [[::InstallingCompilers/nl|Nederlands]]}}|}} {{#ifexist: {{#if: UbuntuHelp:InstallingCompilers | UbuntuHelp:InstallingCompilers | {{#if: | :}}InstallingCompilers}}/no | • {{#if: UbuntuHelp:InstallingCompilers|norsk| [[::InstallingCompilers/no|norsk]]}}|}} {{#ifexist: {{#if: UbuntuHelp:InstallingCompilers | UbuntuHelp:InstallingCompilers | {{#if: | :}}InstallingCompilers}}/oc | • {{#if: UbuntuHelp:InstallingCompilers|occitan| [[::InstallingCompilers/oc|occitan]]}}|}} {{#ifexist: {{#if: UbuntuHelp:InstallingCompilers | UbuntuHelp:InstallingCompilers | {{#if: | :}}InstallingCompilers}}/pl | • {{#if: UbuntuHelp:InstallingCompilers|polski| [[::InstallingCompilers/pl|polski]]}}|}} {{#ifexist: {{#if: UbuntuHelp:InstallingCompilers | UbuntuHelp:InstallingCompilers | {{#if: | :}}InstallingCompilers}}/pt | • {{#if: UbuntuHelp:InstallingCompilers|português| [[::InstallingCompilers/pt|português]]}}|}} {{#ifexist: {{#if: UbuntuHelp:InstallingCompilers | UbuntuHelp:InstallingCompilers | {{#if: | :}}InstallingCompilers}}/ro | • {{#if: UbuntuHelp:InstallingCompilers|română| [[::InstallingCompilers/ro|română]]}}|}} {{#ifexist: {{#if: UbuntuHelp:InstallingCompilers | UbuntuHelp:InstallingCompilers | {{#if: | :}}InstallingCompilers}}/ru | • {{#if: UbuntuHelp:InstallingCompilers|русский| [[::InstallingCompilers/ru|русский]]}}|}} {{#ifexist: {{#if: UbuntuHelp:InstallingCompilers | UbuntuHelp:InstallingCompilers | {{#if: | :}}InstallingCompilers}}/si | • {{#if: UbuntuHelp:InstallingCompilers|සිංහල| [[::InstallingCompilers/si|සිංහල]]}}|}} {{#ifexist: {{#if: UbuntuHelp:InstallingCompilers | UbuntuHelp:InstallingCompilers | {{#if: | :}}InstallingCompilers}}/sq | • {{#if: UbuntuHelp:InstallingCompilers|shqip| [[::InstallingCompilers/sq|shqip]]}}|}} {{#ifexist: {{#if: UbuntuHelp:InstallingCompilers | UbuntuHelp:InstallingCompilers | {{#if: | :}}InstallingCompilers}}/sr | • {{#if: UbuntuHelp:InstallingCompilers|српски / srpski| [[::InstallingCompilers/sr|српски / srpski]]}}|}} {{#ifexist: {{#if: UbuntuHelp:InstallingCompilers | UbuntuHelp:InstallingCompilers | {{#if: | :}}InstallingCompilers}}/sv | • {{#if: UbuntuHelp:InstallingCompilers|svenska| [[::InstallingCompilers/sv|svenska]]}}|}} {{#ifexist: {{#if: UbuntuHelp:InstallingCompilers | UbuntuHelp:InstallingCompilers | {{#if: | :}}InstallingCompilers}}/th | • {{#if: UbuntuHelp:InstallingCompilers|ไทย| [[::InstallingCompilers/th|ไทย]]}}|}} {{#ifexist: {{#if: UbuntuHelp:InstallingCompilers | UbuntuHelp:InstallingCompilers | {{#if: | :}}InstallingCompilers}}/tr | • {{#if: UbuntuHelp:InstallingCompilers|Türkçe| [[::InstallingCompilers/tr|Türkçe]]}}|}} {{#ifexist: {{#if: UbuntuHelp:InstallingCompilers | UbuntuHelp:InstallingCompilers | {{#if: | :}}InstallingCompilers}}/vi | • {{#if: UbuntuHelp:InstallingCompilers|Tiếng Việt| [[::InstallingCompilers/vi|Tiếng Việt]]}}|}} {{#ifexist: {{#if: UbuntuHelp:InstallingCompilers | UbuntuHelp:InstallingCompilers | {{#if: | :}}InstallingCompilers}}/yue | • {{#if: UbuntuHelp:InstallingCompilers|粵語| [[::InstallingCompilers/yue|粵語]]}}|}} {{#ifexist: {{#if: UbuntuHelp:InstallingCompilers | UbuntuHelp:InstallingCompilers | {{#if: | :}}InstallingCompilers}}/zh | • {{#if: UbuntuHelp:InstallingCompilers|中文| [[::InstallingCompilers/zh|中文]]}}|}} {{#ifexist: {{#if: UbuntuHelp:InstallingCompilers | UbuntuHelp:InstallingCompilers | {{#if: | :}}InstallingCompilers}}/zh-hans | • {{#if: UbuntuHelp:InstallingCompilers|中文(简体)| [[::InstallingCompilers/zh-hans|中文(简体)]]}}|}} {{#ifexist: {{#if: UbuntuHelp:InstallingCompilers | UbuntuHelp:InstallingCompilers | {{#if: | :}}InstallingCompilers}}/zh-hant | • {{#if: UbuntuHelp:InstallingCompilers|中文(繁體)| [[::InstallingCompilers/zh-hant|中文(繁體)]]}}|}} |
{{#ifeq:UbuntuHelp:InstallingCompilers|:InstallingCompilers|请不要直接编辑翻译本页,本页将定期与来源同步。}} |
{{#ifexist: :InstallingCompilers/zh | | {{#ifexist: InstallingCompilers/zh | | {{#ifeq: {{#titleparts:InstallingCompilers|1|-1|}} | zh | | }} }} }} {{#ifeq: {{#titleparts:InstallingCompilers|1|-1|}} | zh | | }}
- title Installing Compilers
Installing the GNU C compiler and GNU C++ compiler
To install the gcc and g++ compilers, you will need the build-essential
package. This will also install GNU make. To install the manpages for c and c++ development, install the manpages-dev
package.
Installing the GNU Java compiler
Note that GNU's Java compiler is not the same as the one developed and distributed by Sun Microsystems, and will not provide Java to the firefox browser. For that, please see UbuntuHelp:Java. To install gcj, the GNU Java compiler, install the following package: gcj
.
gcj can be used to:
- compile .java files to bytecode (.class files).
- compile .java files to a linux-executable.
To install the GNU Java bytecode interpreter, you need the gij
package.
To have gcj compile to executables, install libgcj6-dev (otherwise an error during compilation occurs: libgcj.spec: No such file or directory).
Use synaptic to install libgcj6-dev.
Installing the GNU Fortran compilers
To install the GNU Fortran 77 compiler - g77, you need the g77
package.
To install the GNU Fortran 95 compiler - gfortran, the package is: gfortran
.
Installing the GNU autotools
To install autoconf and automake, you need the autoconf
and automake
packages.
Apt-get will tell you to explicitly choose a version of automake. If, for example, you decide to use automake1.9, you need to specify the version, such as the automake1.9
package.