English version
Accueil     À propos     Téléchargement     Ressources     Contactez-nous    

Ce site est rarement mis à jour. Pour les informations les plus récentes, rendez-vous sur le nouveau site OCaml à l'adresse ocaml.org.

Browse thread
Re: [Caml-list] Building camlimages programs on deb (and linux)
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2003-11-24 (18:49)
From: chris.danx <chris.danx@n...>
Subject: Re: [Caml-list] Building camlimages programs on deb (and linux)
Gurr, David (MED, self) wrote:
> Unix linkers can be very "helpful".  Forgive me if you
> already know this but the link order is important. 

No I didn't know what, thanks.

> The dependant lib comes before the lib that it depends on.
> And if you have circular dependencies you will need to
> link a lib multiple times.  So:
>>ocamlc `camlimages-config` -cclib "-L/usr/X11R6/lib 
>> -lxvthumb -lXpm -lX11 -lpng -lfreetype -lz -ljpeg -lgif" 

Just tried that... :(

I updated my system, if there is a bug in Xpm it hasn't been fixed (some 
how I doubt it's a bug - it's more likely me doing something daft).

Interestingly if I take the program off it still complains...

ocamlc `camlimages-config` -cclib "-L/usr/X11R6/lib -lxvthumb -lXpm 
-lX11 -lpng -lfreetype -lz -ljpeg -lgif"

So I guess that it comes from linking with the ocaml files specified in 
camlimages-config with the libraries...

-I /usr/lib/ocaml/3.07/camlimages ci_core.cma ci_gif.cma ci_jpeg.cma 
ci_tiff.cma ci_bmp.cma ci_ppm.cma ci_png.cma ci_ps.cma ci_xpm.cma

If i leave ci_xpm.cma off, it links.  I don't know if it's safe to leave 
it off.  I suppose if I don't use XPM it'll be ok, but it's not the 
greatest solution.


To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners