libraries linked for gtk



Hi,

    I have several questions on gtk, I am new to gnu libraries.

i)  I have downloaded and built gtk2.2.0 from www.gtk.org, with all the dependencies built apriori
    (glib, atk,pango,atk), the build was successful and my lib directory under my install root looks like
    the following:
[/home/simon/local/lib]: ls
total 39512                                 0 libgmodule-2.0.so@
   8 ./                                     0 libgmodule-2.0.so.0@
   8 ../                                   96 libgmodule-2.0.so.0.200.0*
   8 glib-2.0/                              8 libgobject-2.0.la*
   8 gtk-2.0/                               0 libgobject-2.0.so@
   8 libatk-1.0.la*                         0 libgobject-2.0.so.0@
   0 libatk-1.0.so@                      1352 libgobject-2.0.so.0.200.0*
   0 libatk-1.0.so.0@                       8 libgthread-2.0.la*
1472 libatk-1.0.so.0.200.0*                 0 libgthread-2.0.so@
   8 libgdk-x11-2.0.la                      0 libgthread-2.0.so.0@
   0 libgdk-x11-2.0.so@                   112 libgthread-2.0.so.0.200.0*
   0 libgdk-x11-2.0.so.0@                   8 libgtk-x11-2.0.la
6368 libgdk-x11-2.0.so.0.200.0*             0 libgtk-x11-2.0.so@
   8 libgdk_pixbuf-2.0.la*                  0 libgtk-x11-2.0.so.0@
   0 libgdk_pixbuf-2.0.so@               23504 libgtk-x11-2.0.so.0.200.0*
   0 libgdk_pixbuf-2.0.so.0@                8 libpango-1.0.la*
 768 libgdk_pixbuf-2.0.so.0.200.0*          0 libpango-1.0.so@
   8 libgdk_pixbuf_xlib-2.0.la*             0 libpango-1.0.so.0@
   0 libgdk_pixbuf_xlib-2.0.so@          1752 libpango-1.0.so.0.200.0*
   0 libgdk_pixbuf_xlib-2.0.so.0@           8 libpangox-1.0.la
 616 libgdk_pixbuf_xlib-2.0.so.0.200.0*     0 libpangox-1.0.so@
   8 libglib-2.0.la*                        0 libpangox-1.0.so.0@
   0 libglib-2.0.so@                      624 libpangox-1.0.so.0.200.0*
   0 libglib-2.0.so.0@                      8 pango/
2712 libglib-2.0.so.0.200.0*                8 pkgconfig/
   8 libgmodule-2.0.la*

   --> My question: I need to link in gtk gdk glib gmodule and gthread libraries, do I just pass
the libglib-2.0.so.0.200.0 files to g++ in the final link?  I looked at the gtk-demo make as reference
(I included the make output below, there are a mix of direct linking of .so and using -lgmodule-2.0
-lglib2.0, etc.  why is the mix, how do I create .a  (archives), I saw in the gtk-demo in the LDADDS
target it does a strip but I tried to do a strip on the .la it says file format not recognized.

    I linked in my application with the libglib-2.0.so.0.200.0 files it linked but immediately crashed
when I run it.

please help, thanks,
Simon
 

gcc -g -O2 -Wall -o .libs/gtk-demo appwindow.o button_box.o changedisplay.o colorsel.o dialog.o drawingarea.o editable_cells.o images.o item_factory.o list_store.o menus.o panes.o pixbufs.o sizegroup.o stock_browser.o textview.o tree_store.o main.o  ../../gdk-pixbuf/.libs/libgdk_pixbuf-2.0.so -L/home/simon/local/lib ../../gdk/.libs/libgdk-x11-2.0.so -L/usr/X11R6/lib ../../gtk/.libs/libgtk-x11-2.0.so /home/simon/gtklib/gtk+-2.2.0/gdk/.libs/libgdk-x11-2.0.so /home/simon/gtklib/gtk+-2.2.0/gdk-pixbuf/.libs/libgdk_pixbuf-2.0.so -lXinerama -lXext -lX11 /home/simon/local/lib/libpangox-1.0.so /home/simon/local/lib/libpango-1.0.so /home/simon/local/lib/libatk-1.0.so -lgobject-2.0 -lgmodule-2.0 -lglib-2.0 /home/simon/local/lib/libgobject-2.0.so /home/simon/local/lib/libgmodule-2.0.so -ldl /home/simon/local/lib/libglib-2.0.so -lm -Wl,--rpath -Wl,/home/simon/local/lib
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]