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
[Caml-list] (Newbie question): link problem
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2003-11-01 (14:04)
From: Kamil Shakirov <kamils@i...>
Subject: Re: [Caml-list] (Newbie question): link problem

Manfred Lotz <manfred.lotz@web.de> writes:

> Hi there,
> I try to compile a source file which uses Num:
>   ocamlc fac.ml
> I get:
> Error while linking fac.cmo: Reference to undefined global `Num'
> Ok. Now  I try:
>    ocamlc -cclib -lnums fac.ml 
> and get the same error message as above.
> What can I do?
> Manfred

You must compile sources which uses Num like this
    ocamlc -o myprogram nums.cma mysource1.ml mysource2.ml ...
or if you want to get a native version:
    ocamlopt -o myprogram nums.cmxa mysource1.ml mysource2.ml ...

Look at the OCaml user's manual:

Kamil Shakirov

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