caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* [Caml-list] library
@ 2002-12-04 19:38 altavillasalvatore
  2002-12-04 23:39 ` Jacques Garrigue
  0 siblings, 1 reply; 2+ messages in thread
From: altavillasalvatore @ 2002-12-04 19:38 UTC (permalink / raw)
  To: caml-list

Hi,
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.

Regards.





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


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

* Re: [Caml-list] library
  2002-12-04 19:38 [Caml-list] library altavillasalvatore
@ 2002-12-04 23:39 ` Jacques Garrigue
  0 siblings, 0 replies; 2+ messages in thread
From: Jacques Garrigue @ 2002-12-04 23:39 UTC (permalink / raw)
  To: altavillasalvatore; +Cc: caml-list

> 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


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

end of thread, other threads:[~2002-12-04 23:40 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-12-04 19:38 [Caml-list] library altavillasalvatore
2002-12-04 23:39 ` Jacques Garrigue

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).