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 NAA05217; Mon, 23 Apr 2001 13:52:08 +0200 (MET DST) 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 NAA05246 for caml-list@pauillac.inria.fr; Mon, 23 Apr 2001 13:52:08 +0200 (MET DST) 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 TAA27898 for ; Sun, 22 Apr 2001 19:58:16 +0200 (MET DST) Received: from ic.EECS.Berkeley.EDU (ic.EECS.Berkeley.EDU [128.32.168.7]) by concorde.inria.fr (8.11.1/8.10.0) with ESMTP id f3MHwEH05263 for ; Sun, 22 Apr 2001 19:58:14 +0200 (MET DST) Received: (from sutre@localhost) by ic.EECS.Berkeley.EDU (8.8.5/8.8.8) id KAA30860; Sun, 22 Apr 2001 10:58:12 -0700 (PDT) Date: Sun, 22 Apr 2001 10:58:12 -0700 From: Gregoire Sutre To: caml-list@inria.fr Cc: Rupak Majumdar Subject: [Caml-list] OCaml/C++ : STL conflicts Message-ID: <20010422105812.A24638@ic.EECS.Berkeley.EDU> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk Hi, I would like to use a C++ library in an OCaml program. Fortunately, the linking problems were solved quite easily: (1) declaring each external C++ function as extern "C" (2) enlosing the caml/* includes inside an extern "C" (3) specifying the C++ compiler with the -cc option of ocamlc/ocamlopt But I have not tested thoroughly yet. Do you believe that there might be problems with this approach? Regarding (2) above, I was by the way surprised that the caml/* header files did not use the usual construct: #ifdef __cplusplus extern "C" { #endif ------------------- To unsubscribe, mail caml-list-request@inria.fr. Archives: http://caml.inria.fr