Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

Browse thread
[Caml-list] Problem building custom toplevel
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Rolf Wester <rolf.wester@i...>
Subject: [Caml-list] Problem building custom toplevel

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.mli). 
I try to build a custom toplevel with:

	ocamlmktop -custom -thread unix.cma str.cma bigarray.cma nums.cma \
                                          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/ \
	            /lib/ \
		   ../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
../cinterface/cinterface.o(.text+0xb10): undefined reference to  
         `std::_String_base::_Xran() const'
../cinterface/cinterface.o: In function          
            std::char_traits<char>, std::allocator<char> > const&)': 
          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 Archives:
Bug reports: FAQ:
Beginner's list: