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 WAA23759; Sun, 7 Jul 2002 22:13:03 +0200 (MET DST) 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 WAA23861 for ; Sun, 7 Jul 2002 22:13:02 +0200 (MET DST) Received: from mailcity.com (fes.mail.lycos.com [209.185.123.154]) by concorde.inria.fr (8.11.1/8.11.1) with SMTP id g67KD1f19779 for ; Sun, 7 Jul 2002 22:13:01 +0200 (MET DST) Received: from Unknown/Local ([?.?.?.?]) by mailcity.com; Sun Jul 7 13:12:52 2002 To: caml-list@pauillac.inria.fr Date: Sun, 07 Jul 2002 13:12:52 -0700 From: "Gaurav Chanda" Message-ID: Mime-Version: 1.0 X-Sent-Mail: off Reply-To: gaurav_chanda@lycos.com X-Mailer: MailCity Service X-Priority: 3 Subject: [Caml-list] New Object Creation X-Sender-Ip: 128.93.8.52 Organization: Lycos Mail (http://www.mail.lycos.com:80) Content-Type: text/plain; charset=us-ascii Content-Language: en Content-Transfer-Encoding: 7bit Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk Hello I created 2 files : point.ml and point.mli. The first one contained a simple class definition. class point = object value mutable x = 0; method addunit v = v+1 ; end; The second one contained class type point = object value mutable x : int; method addunit : int -> int ; end; I used this class in another file, test.ml which contained open Point; value parse t = match t with [ "" -> let a = new point in () | _ -> () ]; My compilation command was: ocamlopt -pp "camlp4r pa_extend.cmo" -I +camlp4 -c point.mli point.ml test.ml However, on compilation I got an error message: File "t2.ml", line 4, characters 18-27: Unbound class point make: *** [code] Error 2 I am not able to create a new point object from outside the file. Could you help me solve this problem ? Gaurav _____________________________________________________ Supercharge your e-mail with a 25MB Inbox, POP3 Access, No Ads and NoTaglines --> LYCOS MAIL PLUS. http://www.mail.lycos.com/brandPage.shtml?pageId=plus ------------------- 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