caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Basile STARYNKEVITCH <basile@starynkevitch.net>
To: Maurizio Colucci <maurizio.colucci@gmail.com>
Cc: caml-list@yquem.inria.fr
Subject: Re: [Caml-list] Static linking
Date: Wed, 9 Nov 2005 18:28:12 +0100	[thread overview]
Message-ID: <20051109172812.GA2908@ours.starynkevitch.net> (raw)
In-Reply-To: <e919163f0511090914h48e6c85cr@mail.gmail.com>


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


  reply	other threads:[~2005-11-09 17:28 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-11-09 17:14 Maurizio Colucci
2005-11-09 17:28 ` Basile STARYNKEVITCH [this message]
2014-06-06 15:43 [Caml-list] static linking Andreea Costea
2014-06-06 16:14 ` Török Edwin
2014-06-06 17:33 ` Mark Shinwell
2014-06-06 20:24 ` Gerd Stolpmann
2014-06-07  9:55   ` Andreea Costea

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20051109172812.GA2908@ours.starynkevitch.net \
    --to=basile@starynkevitch.net \
    --cc=caml-list@yquem.inria.fr \
    --cc=maurizio.colucci@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).