<?xml version="1.0" encoding="ISO-8859-1"?>

<!DOCTYPE message PUBLIC
  "-//MLarc//DTD MLarc output files//EN"
  "../../mlarc.dtd"[
  <!ATTLIST message
    listname CDATA #REQUIRED
    title CDATA #REQUIRED
  >
]>

  <?xml-stylesheet href="../../mlarc.xsl" type="text/xsl"?>


<message 
  url="2002/07/5e7fdbf53ef067bd1d56aea82980c4ec"
  from="Xavier Leroy &lt;xavier.leroy@i...&gt;"
  author="Xavier Leroy"
  date="2002-07-25T09:17:00"
  subject="Re: [Caml-list] Problem building custom toplevel"
  prev="2002/07/23b94851b6de87ec4685ec6f3ce9b873"
  next="2002/07/c2036a4fb83c16cbfab4d7aa32ec04ed"
  prev-in-thread="2002/07/5a5d67ab05e1acac3eabdab240a35981"
  prev-thread="2002/07/95de666352c0f6a57db385835c3792d1"
  next-thread="2002/07/a2eea2ec85eb7690de7274a72302113e"
  root="../../"
  period="month"
  listname="caml-list"
  title="Archives of the Caml mailing list">

<thread subject="[Caml-list] Problem building custom toplevel">
<msg 
  url="2002/07/8bae1873738de0a0761c052e27155d5e"
  from="Rolf Wester &lt;rolf.wester@i...&gt;"
  author="Rolf Wester"
  date="2002-07-23T20:41:21"
  subject="[Caml-list] Problem building custom toplevel">
<msg 
  url="2002/07/5a5d67ab05e1acac3eabdab240a35981"
  from="Alessandro Baretta &lt;alex@b...&gt;"
  author="Alessandro Baretta"
  date="2002-07-24T08:21:24"
  subject="Re: [Caml-list] Problem building custom toplevel">
</msg>
<msg 
  url="2002/07/5e7fdbf53ef067bd1d56aea82980c4ec"
  from="Xavier Leroy &lt;xavier.leroy@i...&gt;"
  author="Xavier Leroy"
  date="2002-07-25T09:17:00"
  subject="Re: [Caml-list] Problem building custom toplevel">
</msg>
</msg>
</thread>

<contents>
&gt; I have a c++-library compiled with the icc-compiler, a c-interface to this 
&gt; library (cinterface.h and cinterface.cpp) and stubs files generated using 
&gt; camlidl (ocaml_opt.idl, ocaml_opt_stubs.cpp, ocaml_opt.ml, ocaml_opt.mli). 
&gt; I try to build a custom toplevel with:
&gt; [...]
&gt; but get an almost endless list of undefined references (almost 6000 lines of 
&gt; output). Here some examples:

I avoid C++ as much as I can, so this is just a wild guess.  Could it
be that you're calling the wrong linker?  ocamlmltop -custom performs
its linking stage by calling the C compiler that was used to build
OCaml, usually cc or gcc.  (You can see exactly how the linker is
called by adding the flag -verbose.)  Maybe you need to use icc as the
linker, or pass some magic flag to it telling that you're using C++
libraries.  You can do that with the -cc flag, e.g.

        ocamlmktop -cc "icc &lt;whatever options&gt;" -custom ...

Good luck,

- Xavier Leroy
-------------------
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

</contents>

</message>

