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] Linking problem
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2002-09-08 (10:07)
From: Stefano Zacchiroli <zack@c...>
Subject: Re: [Caml-list] Linking problem
On Sun, Sep 08, 2002 at 02:27:13AM +0200, Alessandro Baretta wrote:
> This is very strange. I have not passed ocamlfind the 
> -custom option. So why is it attempting to build a 
> custom-linked bytecode executable?

The '-custom' switch is some time implied, for example it is implied
when you (or some library you are using) are trying to link statically
with some C code.

Cfr Chapter 8 of ocaml manual:


   Link in ``custom runtime'' mode. In the default linking mode, the
   linker produces bytecode that is intended to be executed with the
   shared runtime system, ocamlrun. In the custom runtime mode, the
   linker produces an output file that contains both the runtime system
   and the bytecode for the program. The resulting file is larger, but
   it can be executed directly, even if the ocamlrun command is not
   installed. Moreover, the ``custom runtime'' mode enables static
   linking of Caml code with user-defined C functions, as described in
   chapter 18.

Are you linking against some C code that need to be statically linked?

If this is not the case it is strange because AFAIK pxp doesn't use any
C code and pcre ships a regular shared object; so I was expecting to be
able to build a pure-bytecode executable ...

Anyway I tried to build a sample test against pcre and I was unable to
create a pure-bytecode executable even using "-noautolink" option.

Am I missing something?


Stefano Zacchiroli - undergraduate student of CS @ Univ. Bologna, Italy | ICQ# 33538863 |
"I know you believe you understood what you think I said, but I am not
sure you realize that what you heard is not what I meant!" -- G.Romney
To unsubscribe, mail Archives:
Bug reports: FAQ:
Beginner's list: