Version française
Home     About     Download     Resources     Contact us    
Browse thread
Static linking
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Basile STARYNKEVITCH <basile@s...>
Subject: Re: [Caml-list] Static linking

Hello All,

Le Wed, Nov 09, 2005 at 06:14:00PM +0100, Maurizio Colucci écrivait/wrote:
> I gave an executable, compiled with ocamlopt, to a friend of mine, and
> his system complained about a missing library (libgtkgl-2.0.so.1).
> This library is not available for his linux distribution. How can I
> compile the program by embedding the library in the executable? 

If your system has a static version of libgtkgl (eg on Debian/Sid the
libgtkgl2.0-dev package provides /usr/lib/libgtkgl-2.0.a) you could
pass the "-cclib /usr/lib/libgtkgl-2.0.a" option (without the quotes)
to ocamlopt.

But for this particular library, I believe things are much less simple
in practice, because I think that gtkgl depends upon many other shared
libraries.

You might also consider passing the "-ccopt -static" option to
ocamlopt linking.

Again, GTKGL is not supposed (as GTK) to be statically linked...

Maybe the simplest solution is to find the suitable (rpm or other)
package of libgtkgl for your user!

Regards.

-- 
Basile STARYNKEVITCH         http://starynkevitch.net/Basile/ 
email: basile(at)starynkevitch(dot)net 
8, rue de la Faïencerie, 92340 Bourg La Reine, France