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 UAA06056; Tue, 26 Nov 2002 20:26:29 +0100 (MET) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: (from weis@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id UAA06154 for caml-list@pauillac.inria.fr; Tue, 26 Nov 2002 20:26:28 +0100 (MET) Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id UAA06087 for ; Tue, 26 Nov 2002 20:25:50 +0100 (MET) Received: from iona.labri.fr (iona.labri.fr [147.210.8.143]) by nez-perce.inria.fr (8.11.1/8.11.1) with ESMTP id gAQJPo124090 for ; Tue, 26 Nov 2002 20:25:50 +0100 (MET) Received: from localhost (localhost.localdomain [127.0.0.1]) by iona.labri.fr (Postfix) with ESMTP id 0CBAF7E97 for ; Tue, 26 Nov 2002 20:25:50 +0100 (CET) Received: from there (dune.labri.fr [147.210.8.213]) by iona.labri.fr (Postfix) with SMTP id F40547E76 for ; Tue, 26 Nov 2002 20:25:48 +0100 (CET) Content-Type: text/plain; charset="iso-8859-1" From: =?iso-8859-1?q?Gr=E9goire=20Sutre?= Organization: LaBRI - CNRS To: caml-list@inria.fr Subject: [Caml-list] Error compiling classes with ocamlcp? Date: Tue, 26 Nov 2002 20:25:48 +0100 X-Mailer: KMail [version 1.3.1] MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Message-Id: <20021126192549.F40547E76@iona.labri.fr> X-Virus-Scanned: by AMaViS new-20020517 X-Razor-id: 1d8cd93f97a318c87f1ce99bf9001cd6a4d52b27 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk Hi, I got an error trying to compile an OCaml file with profiling support. I believe the problem arises from the use of objects in my code. On the following simple OCaml source: class my_class = object method do_nothing = () end The command "ocamlcp -c ocamlcp-pb.ml" gives: File "/home/sutre/tmp/camlppc6dad0", line 1, characters 29-33: Syntax error And the generated camlppc6dad0 file is as follows: let __ocaml_prof_cnt_ocamlcp-bug_ = Array.create 0000001 0;; Profiling.counters := ("ocamlcp-bug", ("fm", __ocaml_prof_cnt_ocamlcp-bug_)) :: !Profiling.counters;; class my_class = object (__ocaml_prof_cnt_ocamlcp-bug_.(0) <- Pervasives.succ __ocaml_prof_cnt_ocamlcp-bug_.(0); method do_nothing = ()) end This generated file indeed doesn't compile with ocamlc. I am using the OCaml distribution version 3.06. Doesn't ocamlcp support objects? Thanks for your help, Gregoire Sutre. ------------------- 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