个人工具

“UbuntuHelp:InstallingCompilers”的版本间的差异

来自Ubuntu中文

跳转至: 导航, 搜索
第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 bytecode (.class files).
* compile .java files to a linux-executable.
+
# 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的版本


  1. 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:

  1. compile .java files to bytecode (.class files).
  2. 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.