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 NAA00261; Mon, 7 Apr 2003 13:11:23 +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 NAA00270 for ; Mon, 7 Apr 2003 13:11:22 +0200 (MET DST) Received: from relay2.rbos.com (relay2.rbos.com [194.202.49.178]) by concorde.inria.fr (8.11.1/8.11.1) with ESMTP id h37BBL524439 for ; Mon, 7 Apr 2003 13:11:21 +0200 (MET DST) Received: by relay2.rbos.com; id MAA02260; Mon, 7 Apr 2003 12:11:20 +0100 (BST) Received: from unknown(147.114.6.52) by relay2.rbos.com via smap (V5.5) id xma002029; Mon, 7 Apr 03 12:10:33 +0100 Received: from lonxpr0172.fm.rbsgrp.net (unverified) by bgnml0005.fm.rbsgrp.net (Content Technologies SMTPRS 4.1.5) with ESMTP id for ; Mon, 7 Apr 2003 12:10:32 +0100 Received: by LONXPR0172 with Internet Mail Service (5.5.2653.19) id ; Mon, 7 Apr 2003 12:10:32 +0100 Message-ID: <5D6C430AF508AF4CB04061B775D23A7D04A6DF@lon0748xns.fm.rbsgrp.net> From: "HAYCOCK, Ian, FM IT" To: "'caml-list@inria.fr'" Subject: [Caml-list] C++ embedded ocaml and shared libraries Date: Mon, 7 Apr 2003 12:10:30 +0100 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2653.19) Content-Type: text/plain; charset="iso-8859-1" X-Spam: no; 0.00; embedding:01 addressee:99 plc:99 confidential:98 ocaml:01 caml:01 bank:98 ian:02 compile:02 objects:02 financial:96 library:03 anybody:03 hint:04 embedded:05 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk Hi I'm trying to embed some ocaml code into a C shared library with C code. I can produce a static library that does what I want, but I really need to get a shared library and all attempts I've made so far have failed. Basically I'm trying to compile 2 ml source files into objects and then put these together with objects from C code, which call out to the caml code, into the shared library. However the library creation fails telling me there are multiply defined symbols (eg caml_startup) in the objects produced from the 2 ml source files. Can anybody give me a hint (or even better an example) as to how to do this. The only examples I can find on the web relating to embedding ocaml in C and then creating a shared library involve 1 ml file and 1 C file and in this instance I don't get the multiple symbol problem. Any help appreciated thanks Ian ******************************************************************** Visit our Internet site at http://www.rbsmarkets.com This e-mail is intended only for the addressee named above. As this e-mail may contain confidential or privileged information, if you are not the named addressee, you are not authorised to retain, read, copy or disseminate this message or any part of it. The Royal Bank of Scotland plc is registered in Scotland No 90312 Registered Office: 36 St Andrew Square, Edinburgh EH2 2YB Regulated by the Financial Services Authority ******************************************************************** ------------------- 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