Re: Shared or dynamic?!
On Wed, May 30, 2007 at 07:59:40AM +0200, Tomasz Jankowski wrote: > I'm going to write network library hardly based on GLib to improve my > programming skills. However I haven't wrote any library so far, so I haven't > got any experience with it. :( After reading libtool documentation I became > a bit confused, because I don't know what kind of library should I build. My > library should be linked with program while compilation process, not loaded > during runtime, Why? (If the library is private to one package, that counts as a reason, but see below.) > so I thought, that I must build a static library, but > libraries such as GTK+ or GLib in /usr/lib directory have *.so prefix. I > don't understand it... :( These are shared libraries. In most cases shared libraries are what you want. > Can someone explain it for my? What kind of > library should I build? If the library will be used only inside one package, build it as a libtool convenience library. Otherwise build shared, static or both depending on what the user wants. This works automatically, AC_PROG_LIBTOOL adds corresponding options to configure, with the default to build both types (provided that it's possible on the target platform). Yeti -- http://gwyddion.net/ ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
Re: Shared or dynamic?!
I have only just started with libraries myself, but the best I can explain it to you is this: * Static libraries are hardly different then .o files, except rather then a .o file for each of your source files there is only one, the library. * Dynamic Libraries is any code that must be loaded before the application starts, eg. libc, gtk... This is the type of library you should use 80% of the time. * For the rest you have loadable libraries, basically plugins, flash is a plugin for example. A quick google search got me this page; http://www.yolinux.com/TUTORIALS/LibraryArchives-StaticAndDynamic.html It appears to have everything you need. G'day, Dan On Wed, 2007-30-05 at 07:59 +0200, Tomasz Jankowski wrote: > Hello! > > I'm going to write network library hardly based on GLib to improve my > programming skills. However I haven't wrote any library so far, so I haven't > got any experience with it. :( After reading libtool documentation I became > a bit confused, because I don't know what kind of library should I build. My > library should be linked with program while compilation process, not loaded > during runtime, so I thought, that I must build a static library, but > libraries such as GTK+ or GLib in /usr/lib directory have *.so prefix. I > don't understand it... :( Can someone explain it for my? What kind of > library should I build? > > (Sorry for posting it on this mailing list, but i don't know any reliable > source of information. Moreover we can say, that it's someway linked to GTK+ > apps programming, because I'm using GLib ;P) ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
Shared or dynamic?!
Hello! I'm going to write network library hardly based on GLib to improve my programming skills. However I haven't wrote any library so far, so I haven't got any experience with it. :( After reading libtool documentation I became a bit confused, because I don't know what kind of library should I build. My library should be linked with program while compilation process, not loaded during runtime, so I thought, that I must build a static library, but libraries such as GTK+ or GLib in /usr/lib directory have *.so prefix. I don't understand it... :( Can someone explain it for my? What kind of library should I build? (Sorry for posting it on this mailing list, but i don't know any reliable source of information. Moreover we can say, that it's someway linked to GTK+ apps programming, because I'm using GLib ;P) -- Cya! Tom ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list