Delivered-To: garrigue at math.nagoya-u.ac.jp Delivered-To: lablgtk at yquem.inria.fr Date: Tue, 07 Oct 2008 15:08:14 +0800 From: bill yan Subject: Re: [Lablgtk] Regarding the ".a" files In-reply-to: <20081007172535.35e8e910.mle+ocaml at mega-nerd.com> To: lablgtk at yquem.inria.fr Message-id: <48EB0ADE.4050105 at sun.com> MIME-version: 1.0 References: <48EAFCDA.8000607 at sun.com> <20081007172535.35e8e910.mle+ocaml@mega-nerd.com> Content-Type: multipart/mixed; boundary="===============1944789480==" Mime-version: 1.0 This is a multi-part message in MIME format. --===============1944789480== Content-type: multipart/alternative; boundary="Boundary_(ID_9/WT+LrOiV7hotvqQMCcCQ)" This is a multi-part message in MIME format. --Boundary_(ID_9/WT+LrOiV7hotvqQMCcCQ) Content-type: text/plain; format=flowed; charset=us-ascii Content-transfer-encoding: 7BIT Thanks for the help. Does that mean once OCaml support dynamically linking for native code, lablgtk will have a new version to support dynamic library for native code also? Erik de Castro Lopo ???: >bill yan wrote: > > > >>Hi, >> >>I only see ".a" library files for lablgtk2. Does that mean user only can >>staticly link their programs to those libraries? If like that, when >>lablgtk2 will support dynamically linking? Thanks in advance. >> >> > >Ocaml does not currently support dynamic linking of Ocaml code >but I understand this is coming in version 3.11. > >The ".a" libraries you see for liblgtk2 are the Ocaml parts of >the bindings to libgtk2 etc. The C parts of the underlying libraries >can still be dynamically linked. > >For instance, ldd for an application I've written looks like this: > > linux-gate.so.1 => (0xb7f58000) > libgtk-x11-2.0.so.0 => /usr/lib/libgtk-x11-2.0.so.0 (0xb7bc4000) > libgdk-x11-2.0.so.0 => /usr/lib/libgdk-x11-2.0.so.0 (0xb7b40000) > libatk-1.0.so.0 => /usr/lib/libatk-1.0.so.0 (0xb7b25000) > libgdk_pixbuf-2.0.so.0 => /usr/lib/libgdk_pixbuf-2.0.so.0 (0xb7b0d000) > libm.so.6 => /lib/tls/i686/cmov/libm.so.6 (0xb7ae8000) > libpangocairo-1.0.so.0 => /usr/lib/libpangocairo-1.0.so.0 (0xb7adf000) > libfontconfig.so.1 => /usr/lib/libfontconfig.so.1 (0xb7ab5000) > libXext.so.6 => /usr/lib/libXext.so.6 (0xb7aa7000) > libXrender.so.1 => /usr/lib/libXrender.so.1 (0xb7a9e000) > libXinerama.so.1 => /usr/lib/libXinerama.so.1 (0xb7a9b000) > libXi.so.6 => /usr/lib/libXi.so.6 (0xb7a93000) > libXrandr.so.2 => /usr/lib/libXrandr.so.2 (0xb7a8d000) > libXcursor.so.1 => /usr/lib/libXcursor.so.1 (0xb7a84000) > libXcomposite.so.1 => /usr/lib/libXcomposite.so.1 (0xb7a81000) > libXdamage.so.1 => /usr/lib/libXdamage.so.1 (0xb7a7d000) > libpango-1.0.so.0 => /usr/lib/libpango-1.0.so.0 (0xb7a40000) > libcairo.so.2 => /usr/lib/libcairo.so.2 (0xb79de000) > libX11.so.6 => /usr/lib/libX11.so.6 (0xb78f7000) > libXfixes.so.3 => /usr/lib/libXfixes.so.3 (0xb78f2000) > libgobject-2.0.so.0 => /usr/lib/libgobject-2.0.so.0 (0xb78b6000) > libgmodule-2.0.so.0 => /usr/lib/libgmodule-2.0.so.0 (0xb78b1000) > libdl.so.2 => /lib/tls/i686/cmov/libdl.so.2 (0xb78ad000) > libglib-2.0.so.0 => /usr/lib/libglib-2.0.so.0 (0xb77fc000) > libc.so.6 => /lib/tls/i686/cmov/libc.so.6 (0xb76ad000) > /lib/ld-linux.so.2 (0xb7f59000) > libpangoft2-1.0.so.0 => /usr/lib/libpangoft2-1.0.so.0 (0xb7686000) > libfreetype.so.6 => /usr/lib/libfreetype.so.6 (0xb7618000) > libz.so.1 => /usr/lib/libz.so.1 (0xb7603000) > libexpat.so.1 => /usr/lib/libexpat.so.1 (0xb75e2000) > libXau.so.6 => /usr/lib/libXau.so.6 (0xb75df000) > libpng12.so.0 => /usr/lib/libpng12.so.0 (0xb75bc000) > libpixman-1.so.0 => /usr/lib/libpixman-1.so.0 (0xb7592000) > libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0xb749f000) > libgcc_s.so.1 => /lib/libgcc_s.so.1 (0xb7494000) > libxcb-xlib.so.0 => /usr/lib/libxcb-xlib.so.0 (0xb7492000) > libxcb.so.1 => /usr/lib/libxcb.so.1 (0xb747a000) > libselinux.so.1 => /lib/libselinux.so.1 (0xb7460000) > libpcre.so.3 => /usr/lib/libpcre.so.3 (0xb7439000) > libpthread.so.0 => /lib/tls/i686/cmov/libpthread.so.0 (0xb7421000) > libXdmcp.so.6 => /usr/lib/libXdmcp.so.6 (0xb741c000) > >As you can see, dynamic linking is being used for the C libraries. > >HTH, >Erik > > --Boundary_(ID_9/WT+LrOiV7hotvqQMCcCQ) Content-type: text/html; charset=us-ascii Content-transfer-encoding: 7BIT Thanks for the help.  Does that mean once OCaml support dynamically linking for native code, lablgtk will  have a new version to support dynamic library for native code also?


Erik de Castro Lopo 已写入:
bill yan wrote:

  
Hi,

I only see ".a" library files for lablgtk2. Does that mean user only can
staticly link their programs to those libraries? If like that, when
lablgtk2 will support dynamically linking? Thanks in advance.
    

Ocaml does not currently support dynamic linking of Ocaml code
but I understand this is coming in version 3.11.

The ".a" libraries you see for liblgtk2 are the Ocaml parts of
the bindings to libgtk2 etc. The C parts of the underlying libraries
can still be dynamically linked.

For instance, ldd for an application I've written looks like this:

        linux-gate.so.1 =>  (0xb7f58000)
        libgtk-x11-2.0.so.0 => /usr/lib/libgtk-x11-2.0.so.0 (0xb7bc4000)
        libgdk-x11-2.0.so.0 => /usr/lib/libgdk-x11-2.0.so.0 (0xb7b40000)
        libatk-1.0.so.0 => /usr/lib/libatk-1.0.so.0 (0xb7b25000)
        libgdk_pixbuf-2.0.so.0 => /usr/lib/libgdk_pixbuf-2.0.so.0 (0xb7b0d000)
        libm.so.6 => /lib/tls/i686/cmov/libm.so.6 (0xb7ae8000)
        libpangocairo-1.0.so.0 => /usr/lib/libpangocairo-1.0.so.0 (0xb7adf000)
        libfontconfig.so.1 => /usr/lib/libfontconfig.so.1 (0xb7ab5000)
        libXext.so.6 => /usr/lib/libXext.so.6 (0xb7aa7000)
        libXrender.so.1 => /usr/lib/libXrender.so.1 (0xb7a9e000)
        libXinerama.so.1 => /usr/lib/libXinerama.so.1 (0xb7a9b000)
        libXi.so.6 => /usr/lib/libXi.so.6 (0xb7a93000)
        libXrandr.so.2 => /usr/lib/libXrandr.so.2 (0xb7a8d000)
        libXcursor.so.1 => /usr/lib/libXcursor.so.1 (0xb7a84000)
        libXcomposite.so.1 => /usr/lib/libXcomposite.so.1 (0xb7a81000)
        libXdamage.so.1 => /usr/lib/libXdamage.so.1 (0xb7a7d000)
        libpango-1.0.so.0 => /usr/lib/libpango-1.0.so.0 (0xb7a40000)
        libcairo.so.2 => /usr/lib/libcairo.so.2 (0xb79de000)
        libX11.so.6 => /usr/lib/libX11.so.6 (0xb78f7000)
        libXfixes.so.3 => /usr/lib/libXfixes.so.3 (0xb78f2000)
        libgobject-2.0.so.0 => /usr/lib/libgobject-2.0.so.0 (0xb78b6000)
        libgmodule-2.0.so.0 => /usr/lib/libgmodule-2.0.so.0 (0xb78b1000)
        libdl.so.2 => /lib/tls/i686/cmov/libdl.so.2 (0xb78ad000)
        libglib-2.0.so.0 => /usr/lib/libglib-2.0.so.0 (0xb77fc000)
        libc.so.6 => /lib/tls/i686/cmov/libc.so.6 (0xb76ad000)
        /lib/ld-linux.so.2 (0xb7f59000)
        libpangoft2-1.0.so.0 => /usr/lib/libpangoft2-1.0.so.0 (0xb7686000)
        libfreetype.so.6 => /usr/lib/libfreetype.so.6 (0xb7618000)
        libz.so.1 => /usr/lib/libz.so.1 (0xb7603000)
        libexpat.so.1 => /usr/lib/libexpat.so.1 (0xb75e2000)
        libXau.so.6 => /usr/lib/libXau.so.6 (0xb75df000)
        libpng12.so.0 => /usr/lib/libpng12.so.0 (0xb75bc000)
        libpixman-1.so.0 => /usr/lib/libpixman-1.so.0 (0xb7592000)
        libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0xb749f000)
        libgcc_s.so.1 => /lib/libgcc_s.so.1 (0xb7494000)
        libxcb-xlib.so.0 => /usr/lib/libxcb-xlib.so.0 (0xb7492000)
        libxcb.so.1 => /usr/lib/libxcb.so.1 (0xb747a000)
        libselinux.so.1 => /lib/libselinux.so.1 (0xb7460000)
        libpcre.so.3 => /usr/lib/libpcre.so.3 (0xb7439000)
        libpthread.so.0 => /lib/tls/i686/cmov/libpthread.so.0 (0xb7421000)
        libXdmcp.so.6 => /usr/lib/libXdmcp.so.6 (0xb741c000)

As you can see, dynamic linking is being used for the C libraries.

HTH,
Erik
  
--Boundary_(ID_9/WT+LrOiV7hotvqQMCcCQ)-- --===============1944789480== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Lablgtk mailing list Lablgtk@yquem.inria.fr http://yquem.inria.fr/cgi-bin/mailman/listinfo/lablgtk --===============1944789480==--