⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 glib-building.html

📁 glid编写实例
💻 HTML
📖 第 1 页 / 共 2 页
字号:
<html xmlns:cf="http://docbook.sourceforge.net/xmlns/chunkfast/1.0"><head><meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"><title>Compiling the GLib package</title><meta name="generator" content="DocBook XSL Stylesheets V1.69.0"><link rel="start" href="index.html" title="GLib Reference Manual"><link rel="up" href="glib.html" title="GLib Overview"><link rel="prev" href="glib.html" title="GLib Overview"><link rel="next" href="glib-cross-compiling.html" title="Cross-compiling the GLib package"><meta name="generator" content="GTK-Doc V1.4 (XML mode)"><link rel="stylesheet" href="style.css" type="text/css"><link rel="chapter" href="glib.html" title="GLib Overview"><link rel="chapter" href="glib-fundamentals.html" title="GLib Fundamentals"><link rel="chapter" href="glib-core.html" title="GLib Core Application Support"><link rel="chapter" href="glib-utilities.html" title="GLib Utilities"><link rel="chapter" href="glib-data-types.html" title="GLib Data Types"><link rel="chapter" href="tools.html" title="GLib Tools"><link rel="index" href="ix01.html" title="Index"><link rel="index" href="ix02.html" title="Index of deprecated symbols"><link rel="index" href="ix03.html" title="Index of new symbols in 2.2"><link rel="index" href="ix04.html" title="Index of new symbols in 2.4"><link rel="index" href="ix05.html" title="Index of new symbols in 2.6"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><table class="navigation" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2"><tr valign="middle"><td><a accesskey="p" href="glib.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td><td><a accesskey="u" href="glib.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td><td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td><th width="100%" align="center">GLib Reference Manual</th><td><a accesskey="n" href="glib-cross-compiling.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td></tr></table><div class="refentry" lang="en"><a name="glib-building"></a><div class="titlepage"></div><div class="refnamediv"><table width="100%"><tr><td valign="top"><h2><span class="refentrytitle">Compiling the GLib package</span></h2><p>Compiling the GLib Package &#8212; How to compile GLib itself</p></td><td valign="top" align="right"></td></tr></table></div><div class="refsect1" lang="en"><a name="building"></a><h2>Building the Library on UNIX</h2><p>        On UNIX, GLib uses the standard GNU build system,        using <span class="application">autoconf</span> for package        configuration and resolving portability issues,        <span class="application">automake</span> for building makefiles        that comply with the GNU Coding Standards, and        <span class="application">libtool</span> for building shared        libraries on multiple platforms.  The normal sequence for        compiling and installing the GLib library is thus:        </p><div class="literallayout"><p><br>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;<strong class="userinput"><code>./configure</code></strong><br>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;<strong class="userinput"><code>make</code></strong><br>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;<strong class="userinput"><code>make&#160;install</code></strong><br>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;</p></div><p>      </p><p>        The standard options provided by <span class="application">GNU        autoconf</span> may be passed to the        <span><strong class="command">configure</strong></span> script.  Please see the        <span class="application">autoconf</span> documentation or run        <span><strong class="command">./configure --help</strong></span> for information about        the standard options.      </p><p>        The GTK+ documentation contains         <a href="../gtk/gtk-building.html" target="_top">further details</a> 	about the build process and ways to influence it.       </p></div><div class="refsect1" lang="en"><a name="dependencies"></a><h2>Dependencies</h2><p>        Before you can compile the GLib library, you need to have        various other tools and libraries installed on your        system. The two tools needed during the build process (as        differentiated from the tools used in when creating GLib        mentioned above such as <span class="application">autoconf</span>)        are <span><strong class="command">pkg-config</strong></span> and GNU make.      </p><div class="itemizedlist"><ul type="disc"><li><p>	    <a href="http://www.freedesktop.org/software/pkgconfig/" target="_top">pkg-config</a>	    is a tool for tracking the compilation flags needed for	    libraries that are used by the GLib library. (For each	    library, a small <code class="literal">.pc</code> text file is             installed in a standard location that contains the compilation             flags needed for that library along with version number             information.)  The version of <span><strong class="command">pkg-config</strong></span>             needed to build GLib is mirrored in the 	    <code class="filename">dependencies</code> directory	    on the <a href="ftp://ftp.gtk.org/pub/gtk/v2.2/" target="_top">GTK+ FTP	    site.</a>	  </p></li><li><p>	    The GTK+ makefiles will mostly work with different versions	    of <span><strong class="command">make</strong></span>, however, there tends to be	    a few incompatibilities, so the GTK+ team recommends	    installing <a href="http://www.gnu.org/software/make" target="_top">GNU	    make</a> if you don't already have it on your system	    and using it. (It may be called <span><strong class="command">gmake</strong></span>	    rather than <span><strong class="command">make</strong></span>.)	  </p></li></ul></div><p>        GLib depends on a number of other libraries.      </p><div class="itemizedlist"><ul type="disc"><li><p>	  The <a href="http://www.gnu.org/software/libiconv/" target="_top">GNU	  libiconv library</a> is needed to build GLib if your	  system doesn't have the <code class="function">iconv()</code>	  function for doing conversion between character	  encodings. Most modern systems should have	  <code class="function">iconv()</code>, however many older systems lack 	  an <code class="function">iconv()</code> implementation. On such systems, 	  you must install the libiconv library. This can be found at:	  <a href="http://www.gnu.org/software/libiconv" target="_top">http://www.gnu.org/software/libiconv</a>.	  	</p><p>	  If your system has an <code class="function">iconv()</code> implementation but	  you want to use libiconv instead, you can pass the	  --with-libiconv option to configure. This forces	  libiconv to be used.  	</p><p>	  Note that if you have libiconv installed in your default include	  search path (for instance, in <code class="filename">/usr/local/</code>), but	  don't enable it, you will get an error while compiling GLib because	  the <code class="filename">iconv.h</code> that libiconv installs hides the	  system iconv. 	</p><p>	  If you are using the native iconv implementation on Solaris	  instead of libiconv, you'll need to make sure that you have 	  the converters between locale encodings and UTF-8 installed.	  At a minimum you'll need the SUNWuiu8 package. You probably	  should also install the SUNWciu8, SUNWhiu8, SUNWjiu8, and	  SUNWkiu8 packages.	</p><p>	  The native iconv on Compaq Tru64 doesn't contain support for	  UTF-8, so you'll need to use GNU libiconv instead. (When	  using GNU libiconv for GLib, you'll need to use GNU libiconv	  for GNU gettext as well.) This probably applies to related	  operating systems as well.	</p></li><li><p>	  The libintl library from the <a href="http://www.gtk.org/software/gettext" target="_top">GNU gettext	  package</a> is needed if your system doesn't have the	  <code class="function">gettext()</code> functionality for handling	  message translation databases.	</p></li><li><p>	  A thread implementation is needed, unless you want to compile GLib	  without thread support, which is not recommended. The thread support	  in GLib can be based upon several native thread implementations,

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -