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] mutually referencing compilation units
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2002-09-19 (05:09)
From: Lex Stein <stein@e...>
Subject: [Caml-list] ocamlmktop linking on Darwin


OSX Darwin's default linker is not GNU ld.  Interestingly,
and unfortunately, Darwin's ld does not like "L .". Ocamlmktop
automatically calls gcc with "L .". Is there any way to tell
ocamlmktop to get rid of the space between the `L` and the `.`?
"L." works just fine.

Here is an example of what happens:

ocamlmktop -verbose -o footop -custom unix.cma \
foo.cma -ccopt "-L/usr/local/foo/lib/"
+ gcc  -o 'footop' -I'/usr/local/lib/ocaml' -L/usr/local/foo/lib/ -L .
/tmp/camlprim4813cc.c  '-L/usr/local/lib/ocaml' '-lcamlfoo' '-ldb' '-lunix'
/usr/bin/ld: -L: directory name missing
Error while building custom runtime system
make: *** [footop] Error 2

The following simple example illustrates what happens when the `.`
is moved away from the `L`:

[cstein-4:~/charles] castein% gcc -o foo -L. test.c
[cstein-4:~/charles] castein% gcc -o foo -L . test.c
/usr/bin/ld: -L: directory name missing

I hope that Ocamlmktop can solve this, allowing me to
avoid a non-trivial install of GNU binutils.


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