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

📄 gtk+ faq.htm

📁 gtk 开发手册和参考文档。 包括gtk glib gdk等
💻 HTM
📖 第 1 页 / 共 4 页
字号:
      <UL>
        <LI>
        <P>How to reproduce the bug.</P>
        <P>If you can reproduce it with the testgtk program that is built in the 
        gtk/ subdirectory, that will be most convenient. Otherwise, please 
        include a short test program that exhibits the behavior. As a last 
        resort, you can also provide a pointer to a larger piece of software 
        that can be downloaded.</P>
        <P>(Bugs that can be reproduced within the GIMP are almost as good as 
        bugs that can be reproduced in testgtk. If you are reporting a bug found 
        with the GIMP, please include the version number of the GIMP you are 
        using)</P>
        <LI>
        <P>If the bug was a crash, the exact text that was printed out when the 
        crash occurred.</P>
        <LI>
        <P>Further information such as stack traces may be useful, but are not 
        necessary. If you do send a stack trace, and the error is an X error, it 
        will be more useful if the stacktrace is produced running the test 
        program with the <TT class=LITERAL>--sync</TT> command line 
        option.</P></LI></UL></DIV>
      <DIV class=SECT1>
      <HR>

      <H1 class=SECT1><A name=AEN111>1.10. Is there a Windows version of 
      GTK+?</A></H1>
      <H4 class=sect1>Is there a Windows version of GTK+?</H4>
      <P>There is an on going port of GTK+ to the Windows platform which is 
      making impressive progress.</P>
      <P>See <A target=_top 
      href="http://www.iki.fi/tml/gimp/win32">http://www.iki.fi/tml/gimp/win32</A> 
      for more information.</P></DIV>
      <DIV class=SECT1>
      <HR>

      <H1 class=SECT1><A name=AEN116>1.11. What applications have been written 
      with GTK+?</A></H1>
      <H4 class=sect1>What applications have been written with GTK+?</H4>
      <P>A list of some GTK+ based application can be found on the GTK+ web 
      server at <A target=_top 
      href="http://www.gtk.org/apps/">http://www.gtk.org/apps/</A> and contains 
      more than 350 applications.</P>
      <P>Failing that, look for a project to work on for the GNOME project, <A 
      target=_top href="http://www.gnome.org/">http://www.gnome.org/</A> Write a 
      game. Write something that is useful.</P>
      <P>Some of these are:</P>
      <P></P>
      <UL>
        <LI>
        <P>GIMP (<A target=_top 
        href="http://www.gimp.org/">http://www.gimp.org/</A>), an image 
        manipulation program</P>
        <LI>
        <P>AbiWord (<A target=_top 
        href="http://www.abisource.com/">http://www.abisource.com/</A>), a 
        professional word processor</P>
        <LI>
        <P>Gzilla (<A target=_top 
        href="http://www.levien.com/gzilla/">http://www.levien.com/gzilla/</A>), 
        a web browser</P>
        <LI>
        <P>XQF (<A target=_top 
        href="http://www.botik.ru/~roma/quake/">http://www.botik.ru/~roma/quake/</A>), 
        a QuakeWorld/Quake2 server browser and launcher</P>
        <LI>
        <P>GDK Imlib (<A target=_top 
        href="http://www.rasterman.com/imlib.html">http://www.rasterman.com/imlib.html</A>), 
        a fast image loading and manipulation library for GDK</P>
        <LI>
        <P>Glade (<A target=_top 
        href="http://glade.pn.org/">http://glade.pn.org/</A>), a GTK+ based RAD 
        tool which produces GTK+ applications</P></LI></UL></DIV>
      <DIV class=SECT1>
      <HR>

      <H1 class=SECT1><A name=AEN142>1.12. I'm looking for an application to 
      write in GTK+. How about an IRC client?</A></H1>
      <H4 class=sect1>I'm looking for an application to write in GTK+. How about 
      an IRC client?</H4>
      <P>Ask on gtk-list for suggestions. There are at least three IRC clients 
      already under development (probably more in fact. The server at <A 
      target=_top 
      href="http://www.forcix.cx/irc-clients.html">http://www.forcix.cx/irc-clients.html</A> 
      list a bunch of them).</P>
      <P></P>
      <UL compact>
        <LI><SPAN>X-Chat.</SPAN>
        <LI><SPAN>girc. (Included with GNOME)</SPAN>
        <LI><SPAN>gsirc. (In the gnome CVS tree)</SPAN></LI></UL></DIV></DIV>
      <DIV class=CHAPTER>
      <HR>

      <H1><A name=AEN153>Chapter 2. How to find, configure, install, and 
      troubleshoot GTK+</A></H1>
      <DIV class=TOC>
      <DL>
        <DT><B>Table of Contents</B>
        <DT>2.1. <A href="http://www.gtk.org/faq/#AEN155">What do I need to run 
        GTK+?</A>
        <DT>2.2. <A href="http://www.gtk.org/faq/#AEN158">Where can I get 
        GTK+?</A>
        <DT>2.3. <A href="http://www.gtk.org/faq/#AEN187">How do I 
        configure/compile GTK+?</A>
        <DT>2.4. <A href="http://www.gtk.org/faq/#AEN195">When compiling GTK+ I 
        get an error like: <TT class=LITERAL>make: file `Makefile' line 456: 
        Syntax error</TT></A>
        <DT>2.5. <A href="http://www.gtk.org/faq/#AEN200">I've compiled and 
        installed GTK+, but I can't get any programs to link with it!</A>
        <DT>2.6. <A href="http://www.gtk.org/faq/#AEN233">When compiling 
        programs with GTK+, I get compiler error messages about not being able 
        to find <TT class=LITERAL>glibconfig.h</TT>.</A>
        <DT>2.7. <A href="http://www.gtk.org/faq/#AEN247">When installing a GTK+ 
        application, configure reports that it can't find GTK.</A></DT></DL></DIV>
      <DIV class=SECT1>
      <H1 class=SECT1><A name=AEN155>2.1. What do I need to run GTK+?</A></H1>
      <H4 class=sect1>What do I need to run GTK+?</H4>
      <P>To compile GTK+, all you need is a C compiler (gcc) and the X Window 
      System and associated libraries on your system.</P></DIV>
      <DIV class=SECT1>
      <HR>

      <H1 class=SECT1><A name=AEN158>2.2. Where can I get GTK+?</A></H1>
      <H4 class=sect1>Where can I get GTK+?</H4>
      <P>The canonical site is <A target=_top 
      href="ftp://ftp.gtk.org/pub/gtk">ftp://ftp.gtk.org/pub/gtk</A>.</P>
      <P>This site tends to get busy around the time of a new GTK+ release so 
      try and use one of the mirror sites that are listed in <A target=_top 
      href="ftp://ftp.gtk.org/etc/mirrors">ftp://ftp.gtk.org/etc/mirrors</A></P>
      <P>Here's a few mirror sites to get you started:</P>
      <P></P>
      <UL compact>
        <LI><SPAN>Africa - <A target=_top 
        href="ftp://ftp.is.co.za/applications/gimp">ftp://ftp.is.co.za/applications/gimp</A></SPAN>
        <LI><SPAN>Australia - <A target=_top 
        href="ftp://ftp.au.gimp.org/pub/gimp">ftp://ftp.au.gimp.org/pub/gimp</A></SPAN>
        <LI><SPAN>Finland - <A target=_top 
        href="ftp://ftp.funet.fi/pub/sci/graphics/packages/gimp">ftp://ftp.funet.fi/pub/sci/graphics/packages/gimp</A></SPAN>
        <LI><SPAN>Germany - <A target=_top 
        href="ftp://infosoc.uni-koeln.de/pub/ftp.gimp.org">ftp://infosoc.uni-koeln.de/pub/ftp.gimp.org</A></SPAN>
        <LI><SPAN>Japan - <A target=_top 
        href="ftp://sunsite.sut.ac.jp/pub/archives/packages/gimp">ftp://SunSITE.sut.ac.jp/pub/archives/packages/gimp</A></SPAN>
        <LI><SPAN>UK - <A target=_top 
        href="ftp://ftp.flirble.org/pub/X/gimp">ftp://ftp.flirble.org/pub/X/gimp</A></SPAN>
        <LI><SPAN>US - <A target=_top 
        href="ftp://ftp.insync.net/pub/mirrors/ftp.gimp.org">ftp://ftp.insync.net/pub/mirrors/ftp.gimp.org</A></SPAN></LI></UL></DIV>
      <DIV class=SECT1>
      <HR>

      <H1 class=SECT1><A name=AEN187>2.3. How do I configure/compile 
      GTK+?</A></H1>
      <H4 class=sect1>How do I configure/compile GTK+?</H4>
      <P>Generally, all you will need to do is issue the commands:</P>
      <P>
      <P class=LITERALLAYOUT><TT class=LITERAL>./configure</TT><BR><TT 
      class=LITERAL>make</TT></P>
      <P></P>
      <P>in the gtk+-version/ directory.</P></DIV>
      <DIV class=SECT1>
      <HR>

      <H1 class=SECT1><A name=AEN195>2.4. When compiling GTK+ I get an error 
      like: <TT class=LITERAL>make: file `Makefile' line 456: Syntax 
      error</TT></A></H1>
      <H4 class=sect1>When compiling GTK+ I get an error like: <TT 
      class=LITERAL>make: file `Makefile' line 456: Syntax error</TT></H4>
      <P>Make sure that you are using GNU make (use <TT class=LITERAL>make 
      -v</TT> to check). There are many weird and wonderful versions of make out 
      there, and not all of them handle the automatically generated 
      Makefiles.</P></DIV>
      <DIV class=SECT1>
      <HR>

      <H1 class=SECT1><A name=AEN200>2.5. I've compiled and installed GTK+, but 
      I can't get any programs to link with it!</A></H1>
      <H4 class=sect1>I've compiled and installed GTK+, but I can't get any 
      programs to link with it!</H4>
      <P>This problem is most often encountered when the GTK+ libraries can't be 
      found or are the wrong version. Generally, the compiler will complain 
      about an 'unresolved symbol'. There are two things you need to check:</P>
      <P></P>
      <UL>
        <LI>
        <P>Make sure that the libraries can be found. You want to edit <TT 
        class=FILENAME>/etc/ld.so.conf</TT> to include the directories which 
        contain the GTK libraries, so it looks something like:</P>
        <P>
        <P class=LITERALLAYOUT><TT class=LITERAL>/usr/X11R6/lib</TT><BR><TT 
        class=LITERAL>/usr/local/lib</TT></P>
        <P></P>
        <P>Then you need to run /sbin/ldconfig as root. You can find what 
        directory GTK is in using</P>
        <P>
        <P class=LITERALLAYOUT><TT class=LITERAL>gtk-config --libs</TT></P>
        <P></P>
        <P>If your system doesn't use ld.so to find libraries (such as Solaris), 
        then you will have to use the LD_LIBRARY_PATH environment variable (or 
        compile the path into your program, which I'm not going to cover here). 
        So, with a Bourne type shell you can do (if your GTK libraries are in 
        /usr/local/lib):</P>
        <P>
        <P class=LITERALLAYOUT><TT class=LITERAL>export 
        LD_LIBRARY_PATH=/usr/local/lib</TT></P>
        <P></P>
        <P>and in a csh, you can do:</P>
        <P>
        <P class=LITERALLAYOUT><TT class=LITERAL>setenv LD_LIBRARY_PATH 
        /usr/local/lib</TT></P>
        <P></P>
        <LI>
        <P>Make sure the linker is finding the correct set of libraries. If you 
        have a Linux distribution that installs GTK+ (e.g. RedHat 5.0) then this 
        older version may be used. Now (assuming you have a RedHat system), 
        issue the command</P>
        <P>
        <P class=LITERALLAYOUT><TT class=LITERAL>rpm -e gtk gtk-devel</TT></P>
        <P></P>
        <P>You may also want to remove the packages that depend on gtk (rpm will 
        tell you which ones they are). If you don't have a RedHat Linux system, 
        check to make sure that neither <TT class=FILENAME>/usr/lib</TT> or <TT 
        class=FILENAME>/usr/local/lib</TT> contain any of the libraries libgtk, 
        libgdk, libglib, or libgck. If they do exist, remove them (and any gtk 
        include files, such as <TT class=FILENAME>/usr/include/gtk</TT> and <TT 
        class=FILENAME>/usr/include/gdk</TT>) and reinstall 
      gtk+.</P></LI></UL></DIV>
      <DIV class=SECT1>
      <HR>

      <H1 class=SECT1><A name=AEN233>2.6. When compiling programs with GTK+, I 
      get compiler error messages about not being able to find <TT 
      class=LITERAL>glibconfig.h</TT>.</A></H1>
      <H4 class=sect1>When compiling programs with GTK+, I get compiler error 
      messages about not being able to find <TT 
      class=LITERAL>glibconfig.h</TT>.</H4>
      <P>The header file "glibconfig.h" was moved to the directory 
      $exec_prefix/lib/glib/include/. $exec_prefix is the directory that was 

⌨️ 快捷键说明

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