<?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/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"
  prev="2002/07/133a762c6b32cf03f761f4230b1561c8"
  next="2002/07/c1d27612820e9d845f7a8b7c0a41d2aa"
  next-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>
Hi,

I have a c++-library compiled with the icc-compiler, a c-interface to this 
library (cinterface.h and cinterface.cpp) and stubs files generated using 
camlidl (ocaml_opt.idl, ocaml_opt_stubs.cpp, ocaml_opt.ml, ocaml_opt.mli). 
I try to build a custom toplevel with:

	ocamlmktop -custom -thread unix.cma str.cma bigarray.cma nums.cma \
                                                   threads.cm graphics.cma \
		   ../cinterface/cinterface.o ocaml_opt_stubs.o ocaml_opt.cmo  \
		   /usr/lib/libexpat.a \
		   /usr/lib/libdfftw.a \
                   /opt/intel/compiler60/ia32/lib/libcxa.so \
	            /lib/ld-linux.so \
		   ../lib/libopt.a \
		    -cclib -ldl -cclib -lpthread -cclib -lutil -cclib -lm -cclib -lc \
		   -o ocaml_opt 

but get an almost endless list of undefined references (almost 6000 lines of 
output). Here some examples:
../cinterface/cinterface.o(.text+0x1a): undefined reference to `operator
           new[](unsigned)'
../cinterface/cinterface.o(.text+0xb10): undefined reference to  
         `std::_String_base::_Xran() const'
../cinterface/cinterface.o: In function          
           `std::out_of_range::out_of_range(std::basic_string&lt;char,
            std::char_traits&lt;char&gt;, std::allocator&lt;char&gt; &gt; const&amp;)': 
oe_m2.o(.gnu.linkonce.t._ZNSt6vectorIS_IdSaIdEESaIS1_EE9_Insert_nEPS1_jRKS1_+0x95e):
          undefined reference to `__cxa_end_catch'

oe_m2.o is in libopt.a.

I don't have any idea how to solve this problem. I would be very appreciative 
for help. 

Thanks in advance

Rolf Wester

P.S.: If icc is the problem, compiling libopt.a with g++ would be no option. 
But it should work somehow, I have built a shared library for use with Python 
and that one works.
-------------------
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>

