From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by yquem.inria.fr (Postfix) with ESMTP id 87B59BB81 for ; Wed, 9 Nov 2005 18:28:13 +0100 (CET) Received: from kraid.nerim.net (smtp-103-wednesday.nerim.net [62.4.16.103]) by concorde.inria.fr (8.13.0/8.13.0) with ESMTP id jA9HSDaX011719 for ; Wed, 9 Nov 2005 18:28:13 +0100 Received: from ours.starynkevitch.net (ours.starynkevitch.net [62.212.121.80]) by kraid.nerim.net (Postfix) with ESMTP id 0BF4F40E4D; Wed, 9 Nov 2005 18:28:12 +0100 (CET) Received: from basile by ours.starynkevitch.net with local (Exim 4.54) id 1EZtk4-0000o8-MO; Wed, 09 Nov 2005 18:28:12 +0100 Date: Wed, 9 Nov 2005 18:28:12 +0100 To: Maurizio Colucci Cc: caml-list@yquem.inria.fr Subject: Re: [Caml-list] Static linking Message-ID: <20051109172812.GA2908@ours.starynkevitch.net> References: MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-15 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.5.11 From: Basile STARYNKEVITCH X-Miltered: at concorde with ID 437231AD.001 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Spam: no; 0.00; caml-list:01 basile:01 basile:01 ecrivait:01 ocamlopt:01 complained:01 usr:01 lib:01 -cclib:01 usr:01 lib:01 ocamlopt:01 -static:01 gtk:01 statically:01 X-Spam-Checker-Version: SpamAssassin 3.0.3 (2005-04-27) on yquem.inria.fr X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=disabled version=3.0.3 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