📄 building.sgml
字号:
applications</link>. You can test your GTK+ installation by running the <command>gtk-demo</command> program that GTK+ installs. </para> <para> If one of the <filename>configure</filename> scripts fails or running <command>make</command> fails, look closely at the error messages printed; these will often provide useful information as to what went wrong. When <filename>configure</filename> fails, extra information, such as errors that a test compilation ran into, is found in the file <filename>config.log</filename>. Looking at the last couple of hundred lines in this file will frequently make clear what went wrong. If all else fails, you can ask for help on the gtk-list mailing list. See <xref linkend="gtk-resources"/> for more information. </para> </refsect1> <refsect1 id="extra-configuration-options"> <title>Extra Configuration Options</title> <para> In addition to the normal options, the <command>configure</command> script for the GTK+ library supports a number of additional arguments. (Command line arguments for the other GTK+ libraries are described in the documentation distributed with the those libraries.) <cmdsynopsis> <command>configure</command> <group> <arg>--disable-modules</arg> <arg>--enable-modules</arg> </group> <group> <arg>--with-included-loaders==LOADER1,LOADER2,...</arg> </group> <group> <arg>--enable-debug=[no|minimum|yes]</arg> </group> <group> <arg>--disable-visibility</arg> <arg>--enable-visibility</arg> </group> <group> <arg>--disable-shm</arg> <arg>--enable-shm</arg> </group> <group> <arg>--disable-xim</arg> <arg>--enable-xim</arg> </group> <group> <arg>--disable-xim-inst</arg> <arg>--enable-xim-inst</arg> </group> <group> <arg>--disable-xkb</arg> <arg>--enable-xkb</arg> </group> <group> <arg>--disable-xinerama</arg> <arg>--enable-xinerama</arg> </group> <group> <arg>--disable-gtk-doc</arg> <arg>--enable-gtk-doc</arg> </group> <group> <arg>--with-xinput=[no|yes]</arg> </group> <group> <arg>--with-gdktarget=[x11|win32|quartz|directfb]</arg> </group> </cmdsynopsis> </para> <formalpara> <title><systemitem>--disable-modules</systemitem> and <systemitem>--enable-modules</systemitem></title> <para> Normally GTK+ will try to build the GdkPixbuf image file format loaders as little shared libraries that are loaded on demand. The <systemitem>--disable-modules</systemitem> argument indicates that they should all be built statically into the GTK+ library instead. This is useful for people who need to produce statically-linked binaries. If neither <systemitem>--disable-modules</systemitem> nor <systemitem>--enable-modules</systemitem> is specified, then the <command>configure</command> script will try to auto-detect whether shared modules work on your system. </para> </formalpara> <formalpara> <title><systemitem>--with-included-loaders</systemitem></title> <para> This option allows you to specify which image loaders you want to include; for example, you might include only the PNG loader to create a smaller GdkPixbuf binary. </para> </formalpara> <formalpara> <title><systemitem>--enable-debug</systemitem></title> <para> Turns on various amounts of debugging support. Setting this to 'no' disables g_assert(), g_return_if_fail(), g_return_val_if_fail() and all cast checks between different object types. Setting it to 'minimum' disables only cast checks. Setting it to 'yes' enables <link linkend="GTK-Debug-Options">runtime debugging</link>. The default is 'minimum'. Note that 'no' is fast, but dangerous as it tends to destabilize even mostly bug-free software by changing the effect of many bugs from simple warnings into fatal crashes. Thus <option>--enable-debug=no</option> should <emphasis>not</emphasis> be used for stable releases of GTK+. </para> </formalpara> <formalpara> <title><systemitem>--disable-visibility</systemitem> and <systemitem>--enable-visibility</systemitem></title> <para> The option <systemitem>--disable-visibility</systemitem> turns off the use of ELF visibility attributes for linking optimizations. This makes sense while changing GTK+ itself, since the way in which GTK+ uses visibility attributes forces a full rebuild of all source files for any header modification. </para> </formalpara> <formalpara> <title><systemitem>--enable-explicit-deps</systemitem> and <systemitem>--disable-explicit-deps</systemitem></title> <para> If <systemitem>--enable-explicit-deps</systemitem> is specified then GTK+ will write the full set of libraries that GTK+ depends upon into its <literal>.pc</literal> files to be used when programs depending on GTK+ are linked. Otherwise, GTK+ only will include the GTK+ libraries themselves, and will depend on system library dependency facilities to bring in the other libraries. By default GTK+ will disable explicit dependencies unless it detects that they are needed on the system. (If you specify <systemitem>--enable-static</systemitem> to force building of static libraries, then explicit dependencies will be written since library dependencies don't work for static libraries.) Specifying <systemitem>--enable-explicit-deps</systemitem> or <systemitem>--enable-static</systemitem> can cause compatibility problems when libraries that GTK+ depends upon change their versions, and should be avoided if possible. </para> </formalpara> <formalpara> <title><systemitem>--disable-shm</systemitem> and <systemitem>--enable-shm</systemitem></title> <para> These options can be used to control whether GTK+ will use shared memory to communicate with the X server when possible. The default is 'yes'. </para> </formalpara> <formalpara> <title><systemitem>--disable-xim</systemitem> and <systemitem>--enable-xim</systemitem></title> <para> These options can be used to control whether GTK+ will be compiled with support for XIM. (The X Input Method extension, used for Japanese input.) The default is yes. </para> </formalpara> <formalpara> <title><systemitem>--disable-xim-inst</systemitem> and <systemitem>--enable-xim-inst</systemitem></title> <para> These options determine whether GTK+ will use the XIM instantiate callback. The default is 'yes', unless the host system is Solaris, where <function>XRegisterIMInstantiateCallback()</function> seems to cause a segfault. </para> </formalpara> <formalpara> <title><systemitem>--disable-xkb</systemitem> and <systemitem>--enable-xkb</systemitem></title> <para> By default the <command>configure</command> script will try to auto-detect whether the XKB extension is supported by the X libraries GTK+ is linked with. These options can be used to explicitly control whether GTK+ will support the XKB extension. </para> </formalpara> <formalpara> <title><systemitem>--disable-xinerama</systemitem> and <systemitem>--enable-xinerama</systemitem></title> <para> By default the <command>configure</command> script will try to link against the Xinerama libraries if they are found. These options can be used to explicitly control whether Xinerama should be used. </para> </formalpara> <formalpara> <title><systemitem>--disable-gtk-doc</systemitem> and <systemitem>--enable-gtk-doc</systemitem></title> <para> The <application>gtk-doc</application> package is used to generate the reference documentation included with GTK+. By default support for <application>gtk-doc</application> is disabled because it requires various extra dependencies to be installed. If you have <application>gtk-doc</application> installed and are modifying GTK+, you may want to enable <application>gtk-doc</application> support by passing in <systemitem>--enable-gtk-doc</systemitem>. If not enabled, pre-generated HTML files distributed with GTK+ will be installed. </para> </formalpara> <formalpara> <title><systemitem>--with-xinput</systemitem></title> <para> Controls whether GTK+ is built with support for the XInput extension. The XInput extension provides an interface to extended input devices such as graphics tablets. When this support is compiled in, specially written GTK+ programs can get access to subpixel positions, multiple simultaneous input devices, and extra "axes" provided by the device such as pressure and tilt information. This is only known to work well on XFree86 systems, though other systems do have this extension. </para> </formalpara> <formalpara> <title><systemitem>--with-gdktarget</systemitem></title> <para> Toggles between the supported backends for GDK. The default is x11, unless the platform is Windows, in which case the default is win32. Other supported backends are the quartz backend for OS X, and the DirectFB backend for the Linux framebuffer. </para> </formalpara> </refsect1></refentry><!-- Local Variables: --><!-- sgml-parent-document: ("gtk-docs.sgml" "chapter" "refentry") --><!-- End: -->
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -