From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from majordomo@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id QAA20339; Sat, 1 Nov 2003 16:39:47 +0100 (MET) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id QAA20073 for ; Sat, 1 Nov 2003 16:39:45 +0100 (MET) Received: from main.gmane.org (main.gmane.org [80.91.224.249]) by concorde.inria.fr (8.11.1/8.11.1) with ESMTP id hA1Fdi119418 for ; Sat, 1 Nov 2003 16:39:45 +0100 (MET) Received: from list by main.gmane.org with local (Exim 3.35 #1 (Debian)) id 1AFxqq-00035R-00 for ; Sat, 01 Nov 2003 16:39:44 +0100 X-Injected-Via-Gmane: http://gmane.org/ To: caml-list@inria.fr Received: from sea.gmane.org ([80.91.224.252]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1AFxqp-00035J-00 for ; Sat, 01 Nov 2003 16:39:43 +0100 Received: from news by sea.gmane.org with local (Exim 3.35 #1 (Debian)) id 1AFxqp-0003to-00 for ; Sat, 01 Nov 2003 16:39:43 +0100 From: Manfred Lotz Subject: [Caml-list] Re: (Newbie question): link problem Date: Sat, 01 Nov 2003 16:27:37 +0100 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Complaints-To: usenet@sea.gmane.org User-Agent: Pan/0.14.2 (This is not a psychotic episode. It's a cleansing moment of clarity.) X-Loop: caml-list@inria.fr X-Spam: no; 0.00; newbie:01 ocamlc:01 ocamlc:01 myprogram:01 nums:01 ocamlopt:01 myprogram:01 nums:01 3.07:01 3.07:01 -refman:01 cmo:01 cmxa:01 ocaml:01 caml:01 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk On Sat, 01 Nov 2003 17:07:57 +0300, Kamil Shakirov wrote: > Hello, > > Manfred Lotz 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