* ocamlopt, .cmxa and "not a compilation unit description" error Options
@ 2008-06-10 18:15 Charles Hymans
2008-06-10 19:57 ` [Caml-list] ocamlopt,.cmxa " David Allsopp
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Charles Hymans @ 2008-06-10 18:15 UTC (permalink / raw)
To: caml-list
[-- Attachment #1: Type: text/plain, Size: 702 bytes --]
Hi,
I'd like to generate a library from a file that uses the nums library
(in a way such that the final user of my library does not have to
specify that nums is necessary).
I was able to generate a .cma with the following command:
ocamlc -a nums.cma file.ml -o lib.cma
However to generate a .cmxa, the command:
ocamlopt -a nums.cmxa file.ml -o lib.cmxa
fails and reports the error that "nums.cmxa is not a compilation unit
description."
I can always do:
ocamlopt -a file.ml -o lib.cmxa
But the user of my library will have to necessarily specify nums.cmxa
when compiling his project.
Is there a way to go around this? (for instance, by putting the option
nums.cmxa into the library?)
Thank you.
[-- Attachment #2: Type: text/html, Size: 978 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* RE: [Caml-list] ocamlopt,.cmxa and "not a compilation unit description" error Options
2008-06-10 18:15 ocamlopt, .cmxa and "not a compilation unit description" error Options Charles Hymans
@ 2008-06-10 19:57 ` David Allsopp
2008-06-10 20:57 ` [Caml-list] ocamlopt, .cmxa " Richard Jones
2008-06-11 19:28 ` Nicolas Pouillard
2 siblings, 0 replies; 4+ messages in thread
From: David Allsopp @ 2008-06-10 19:57 UTC (permalink / raw)
To: caml-list
> Hi,
> I'd like to generate a library from a file that uses the nums library
> (in a way such that the final user of my library does not have to
> specify that nums is necessary).
Have you considered using ocamlfind?
David
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Caml-list] ocamlopt, .cmxa and "not a compilation unit description" error Options
2008-06-10 18:15 ocamlopt, .cmxa and "not a compilation unit description" error Options Charles Hymans
2008-06-10 19:57 ` [Caml-list] ocamlopt,.cmxa " David Allsopp
@ 2008-06-10 20:57 ` Richard Jones
2008-06-11 19:28 ` Nicolas Pouillard
2 siblings, 0 replies; 4+ messages in thread
From: Richard Jones @ 2008-06-10 20:57 UTC (permalink / raw)
To: Charles Hymans; +Cc: caml-list
On Tue, Jun 10, 2008 at 08:15:13PM +0200, Charles Hymans wrote:
> I'd like to generate a library from a file that uses the nums library
> (in a way such that the final user of my library does not have to
> specify that nums is necessary).
Don't fight it, use findlib!
Rich.
--
Richard Jones
Red Hat
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Caml-list] ocamlopt, .cmxa and "not a compilation unit description" error Options
2008-06-10 18:15 ocamlopt, .cmxa and "not a compilation unit description" error Options Charles Hymans
2008-06-10 19:57 ` [Caml-list] ocamlopt,.cmxa " David Allsopp
2008-06-10 20:57 ` [Caml-list] ocamlopt, .cmxa " Richard Jones
@ 2008-06-11 19:28 ` Nicolas Pouillard
2 siblings, 0 replies; 4+ messages in thread
From: Nicolas Pouillard @ 2008-06-11 19:28 UTC (permalink / raw)
To: Charles Hymans; +Cc: Caml_mailing list
[-- Attachment #1: Type: text/plain, Size: 648 bytes --]
Excerpts from Charles Hymans's message of Tue Jun 10 20:15:13 +0200 2008:
> Hi,
>
> I'd like to generate a library from a file that uses the nums library
> (in a way such that the final user of my library does not have to
> specify that nums is necessary).
>
> I was able to generate a .cma with the following command:
> ocamlc -a nums.cma file.ml -o lib.cma
>
> However to generate a .cmxa, the command:
> ocamlopt -a nums.cmxa file.ml -o lib.cmxa
>
> fails and reports the error that "nums.cmxa is not a compilation unit
> description."
In byte-code libraries can contains libraries, but not in native code.
--
Nicolas Pouillard aka Ertai
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 194 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2008-06-11 19:28 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-06-10 18:15 ocamlopt, .cmxa and "not a compilation unit description" error Options Charles Hymans
2008-06-10 19:57 ` [Caml-list] ocamlopt,.cmxa " David Allsopp
2008-06-10 20:57 ` [Caml-list] ocamlopt, .cmxa " Richard Jones
2008-06-11 19:28 ` Nicolas Pouillard
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox