* [Caml-list] (Newbie question): link problem @ 2003-11-01 13:07 Manfred Lotz 2003-11-01 14:07 ` Kamil Shakirov 0 siblings, 1 reply; 3+ messages in thread From: Manfred Lotz @ 2003-11-01 13:07 UTC (permalink / raw) To: caml-list 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 ------------------- 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] 3+ messages in thread
* Re: [Caml-list] (Newbie question): link problem 2003-11-01 13:07 [Caml-list] (Newbie question): link problem Manfred Lotz @ 2003-11-01 14:07 ` Kamil Shakirov 2003-11-01 15:27 ` [Caml-list] " Manfred Lotz 0 siblings, 1 reply; 3+ messages in thread From: Kamil Shakirov @ 2003-11-01 14:07 UTC (permalink / raw) To: Manfred Lotz; +Cc: caml-list Hello, 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: http://caml.inria.fr/distrib/ocaml-3.07/ocaml-3.07-refman.html.tar.gz -- 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 ^ permalink raw reply [flat|nested] 3+ messages in thread
* [Caml-list] Re: (Newbie question): link problem 2003-11-01 14:07 ` Kamil Shakirov @ 2003-11-01 15:27 ` Manfred Lotz 0 siblings, 0 replies; 3+ messages in thread From: Manfred Lotz @ 2003-11-01 15:27 UTC (permalink / raw) To: caml-list On Sat, 01 Nov 2003 17:07:57 +0300, Kamil Shakirov wrote: > Hello, > > 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 ... > Yep, that did it. > Look at the OCaml user's manual: > http://caml.inria.fr/distrib/ocaml-3.07/ocaml-3.07-refman.html.tar.gz Got it! Before I had a look at the user manual. However I only looked at chapter 8 about batch compilation where something like this was not explicitly stated. Thanks, Manfred ------------------- 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] 3+ messages in thread
end of thread, other threads:[~2003-11-01 15:39 UTC | newest] Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2003-11-01 13:07 [Caml-list] (Newbie question): link problem Manfred Lotz 2003-11-01 14:07 ` Kamil Shakirov 2003-11-01 15:27 ` [Caml-list] " Manfred Lotz
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox