Mailing list for all users of the OCaml language and system.
 help / color / mirror / Atom feed
* Static linking
@ 2005-11-09 17:14 Maurizio Colucci
  2005-11-09 17:28 ` [Caml-list] " Basile STARYNKEVITCH
  0 siblings, 1 reply; 2+ messages in thread
From: Maurizio Colucci @ 2005-11-09 17:14 UTC (permalink / raw)
  To: caml-list

Hello.

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? I was
expecting to find an option in the manual, but I didn't. Thanks for
any info.

Maurizio


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [Caml-list] Static linking
  2005-11-09 17:14 Static linking Maurizio Colucci
@ 2005-11-09 17:28 ` Basile STARYNKEVITCH
  0 siblings, 0 replies; 2+ messages in thread
From: Basile STARYNKEVITCH @ 2005-11-09 17:28 UTC (permalink / raw)
  To: Maurizio Colucci; +Cc: caml-list


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


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2005-11-09 17:28 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-11-09 17:14 Static linking Maurizio Colucci
2005-11-09 17:28 ` [Caml-list] " Basile STARYNKEVITCH

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox