Date: Tue, 12 Oct 2004 17:41:04 +0900 (JST) Message-Id: <20041012.174104.189732883.garrigue at math.nagoya-u.ac.jp> To: dmentre at linux-france.org Cc: lablgtk at kaba.or.jp Subject: Re: How to compile a lablgtk2 application statically? From: Jacques Garrigue In-Reply-To: <87mzyu4uz5.fsf at linux-france.org> References: <87mzyu4uz5.fsf at linux-france.org> Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit From: David MENTRE > I'm trying to compile my lablgtk2 application statically but I'm lost in > the thousand of libraries needed for it. As anybody already done this > and could give me some information? Linking statically with gtk2 is not easy, and you're bound to loose some capabilities, as some extensions like input methods or image formats are provided through loadable modules. I'm no expert of the task, but it is possible, and I believe the Unison team did it several times. > Here is below, after several iterations, the point I have arrived to. > > Several things I don't understand: > > - despite giving -lXcursor to the linker and having checked that the > library is available on my system, ld does not want to link with it. > > $ ls -l /usr/lib/libXcursor.so.1* > lrwxrwxrwx 1 root root 19 2004-04-28 19:05 /usr/lib/libXcursor.so.1 -> libXcursor.so.1.0.2 > -rw-r--r-- 1 root root 33128 2004-04-19 23:28 /usr/lib/libXcursor.so.1.0.2 > > [...] > /usr/bin/ld: cannot find -lXcursor > collect2: ld returned 1 exit status No surprise there: for static link you need to have all libraries available in their static form, i.e. you need libXcursor.a. Maybe it could be a good idea to try to compile a smaller version of gtk, with --disable-shared, and with most dependencies disables. > - what is the library that contains png, jpeg and tiff code? libpng.a/libjpeg.a/libtiff.a > - any idea how I can found missing libraries for: > > - FT_Get_BDF_Property like symbols? libfreetype.a > - XNextRequest symbol? ?? > - FcFontList like symbols? libfontconfig.a Hope this helps, Jacques