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: 2002-07-24 (08:21)
From: Alessandro Baretta <alex@b...>
Subject: Re: [Caml-list] Problem building custom toplevel
Rolf Wester wrote:
> 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.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 
> ...

Apparently no Jedi Camler has answered your question yet, so 
I'll give you my opinion FWIW. I believe you are linking the 
files in the wrong order. All references in a given file 
provided as input to the ocaml compiler during the linking 
phase must be resolved in the files *preceding* it on the 
command line. The fact that the linker is unable to resolve 
such "banal" references as operator new probably indicates 
that should be placed towards the beginning of the 
cammand line. Anyhow, try to work out a dependency DAG 
between the different linking modules, in order to discover 
precisely what conflict(s) is(are) causing the above 
mentioned problem.

I hope this helps. Otherwise, you'll have to wait for one of 
the Jedis to come along and solve the problem.


To unsubscribe, mail Archives:
Bug reports: FAQ:
Beginner's list: