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] Filename.quote - again
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Vitaly Lugovsky <vsl@o...>
Subject: [Caml-list] Re: Filename.quote - again
On Mon, 15 Apr 2002, Xavier Leroy wrote:

> > I can't understand the meaning of the following code:
> Filename.quote puts its argument between single quotes:
>  -->  ''
> and if there's a single quote inside the argument, the following is
> generated:
>         foo'bar --> 'foo'\''bar'

 I can't understand, what is it for?!? We don't have file names with

> i.e. the ' causes the current quote to be closed, an unquoted \' to be
> generated, and a new quote to be opened.  This seems to work fine with
> any Unix shell.

 Sure, it works too fine...

> >  It makes gcc crazy when you passing linking
> > options with spaces inside (try to compile
> > camltk418 for example).
> Can you provide a more specific bug report?  What is passed to gcc
> that gcc doesn't like?

(from camltk418)

$ocamlc -custom -linkall -o ocamltktop -I ../support \
    -ccopt -L../support -cclib -lcamltk -ccopt "" \
 -cclib "-ltk8.3 -ltcl8.3 -ldl " -ccopt " -L/usr/X11R6/lib" \
 -cclib " -lSM -lICE -lX11  -lm" \
 toplevellib.cma camltk.cma topmain.cmo
i586-alt-linux-gcc:  -lSM -lICE -lX11  -lm: No such file or directory
i586-alt-linux-gcc:  -lSM -lICE -lX11  -lm: No such file or directory
Error while building custom runtime system

 With '-verbose' option I got something like
gcc ... ' -L/usr/X11R6/lib ' ' -lSM -lICE -lX11  -lm' ...

 gcc treats this as a file name, not as an options, thanx
to the single quotes.

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