Version française
Home     About     Download     Resources     Contact us    
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: -- (:)
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:

   -custom

   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?

Cheers.

-- 
Stefano Zacchiroli - undergraduate student of CS @ Univ. Bologna, Italy
zack@cs.unibo.it | ICQ# 33538863 | http://www.cs.unibo.it/~zacchiro
"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 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