Version française
Home     About     Download     Resources     Contact us    
Browse thread
[Caml-list] library
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Jacques Garrigue <garrigue@k...>
Subject: Re: [Caml-list] library
> my program (babbage.ml) use str and unix library.
> I would want to link both in my program.
> 
> This command  allows me to link one library(unix or str)
> 
> ocamlc -o babbage -custom unix.cma babbage.ml -cclib -lunix 
> 
> but i would want to link str and unix library together.

What incredibly old version of ocaml are you using?
Nowadays you can simply write
         ocaml -o babbage unix.cma babbage.ml
and the linker takes care of including the needed stub libraries,
creating a custom executable if needed, or using dlls if available.
Add only -custom if you want to force the creation of a self-contained
executable (not depending on ocamlrun and dlls).

If you need two libraries then it is just
         ocaml -o babbage unix.cma str.cma babbage.ml

Cheers,

Jacques Garrigue
-------------------
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