caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* ocamlopt -a and module order
@ 2006-01-24 20:58 Florian Weimer
  2006-01-24 22:03 ` [Caml-list] " Martin Jambon
  0 siblings, 1 reply; 3+ messages in thread
From: Florian Weimer @ 2006-01-24 20:58 UTC (permalink / raw)
  To: caml-list

When creating libraries using ocamlopt -a, it seems that it is
necessary to give the modules on the command line in such an order
that all inter-module references are to modules which precede on the
command line.  Otherwise, I get link-time errors when using the
library.

In my case, there are no cyclic module references, and there is no
requirement that the modules are initialized in a particular order
(beyond that what is implied by explicit references), so a simple
topological sort could come up with a proper ordering.  Is there some
way to have ocamlopt do this for me?


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

* Re: [Caml-list] ocamlopt -a and module order
  2006-01-24 20:58 ocamlopt -a and module order Florian Weimer
@ 2006-01-24 22:03 ` Martin Jambon
  2006-01-25 20:12   ` Florian Weimer
  0 siblings, 1 reply; 3+ messages in thread
From: Martin Jambon @ 2006-01-24 22:03 UTC (permalink / raw)
  To: Florian Weimer; +Cc: caml-list

On Tue, 24 Jan 2006, Florian Weimer wrote:

> When creating libraries using ocamlopt -a, it seems that it is
> necessary to give the modules on the command line in such an order
> that all inter-module references are to modules which precede on the
> command line.  Otherwise, I get link-time errors when using the
> library.
>
> In my case, there are no cyclic module references, and there is no
> requirement that the modules are initialized in a particular order
> (beyond that what is implied by explicit references), so a simple
> topological sort could come up with a proper ordering.  Is there some
> way to have ocamlopt do this for me?

ocamldsort can do that.


Martin

--
Martin Jambon, PhD
http://martin.jambon.free.fr

Visit http://wikiomics.org, the Bioinformatics Howto Wiki


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

* Re: [Caml-list] ocamlopt -a and module order
  2006-01-24 22:03 ` [Caml-list] " Martin Jambon
@ 2006-01-25 20:12   ` Florian Weimer
  0 siblings, 0 replies; 3+ messages in thread
From: Florian Weimer @ 2006-01-25 20:12 UTC (permalink / raw)
  To: Martin Jambon; +Cc: caml-list

* Martin Jambon:

> ocamldsort can do that.

Thanks, works like a charm.


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

end of thread, other threads:[~2006-01-25 20:12 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-01-24 20:58 ocamlopt -a and module order Florian Weimer
2006-01-24 22:03 ` [Caml-list] " Martin Jambon
2006-01-25 20:12   ` Florian Weimer

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