From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: weis Received: (from weis@localhost) by pauillac.inria.fr (8.6.10/8.6.6) id OAA13566 for caml-redistribution; Wed, 20 Sep 1995 14:54:35 +0200 Received: from cornas.inria.fr (cornas.inria.fr [128.93.8.39]) by pauillac.inria.fr (8.6.10/8.6.6) with SMTP id OAA13363 for ; Wed, 20 Sep 1995 14:43:24 +0200 Received: by cornas.inria.fr; Wed, 20 Sep 1995 14:43:16 +0200 Date: Wed, 20 Sep 1995 14:43:16 +0200 Message-Id: <199509201243.AA20588@cornas.inria.fr> From: Jean-Marie Geffroy To: stefan.monnier@epfl.ch Cc: christ@mdhost.cse.tek.com, caml-list@pauillac.inria.fr In-Reply-To: <7751.811598499@lia.di.epfl.ch> (stefan.monnier@epfl.ch) Subject: Re: interface to C++ Reply-To: Jean-Marie.Geffroy@inria.fr Sender: weis Stefan Monnier wrote > Rather than mess around with the mangled names, you might be better > off trying to compile caml-light with your C++ compiler so that the > name (de)mangling is all done by your compiler. Since C++ is an > approximate superset of ANSI C, it might work. Right. The Windows version (1) is in fact already compiled this way: the standard caml system is written in pure C but compiled with a C++ compiler. The graphical interface is written in C++ and uses the MFC. It exports 5 or 6 functions through extern "C" declarations such as: extern "C" ui_xxx(...){...} The C modules contain standard extern declarations: extern ui_xxx(...); Linking C++ functions is thus completely straightforward and there's no messing around with names. Hope this helps ! Jean-Marie (1) soon available !