caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Olivier Andrieu <oandrieu@nerim.net>
To: matthieu.dubuget@gmail.com
Cc: caml-list@yquem.inria.fr
Subject: Re: [Caml-list] Pre-processor sub-process
Date: Mon, 28 Sep 2009 10:33:29 +0200	[thread overview]
Message-ID: <95513600909280133i4325743nba48d1fddaa5fe50@mail.gmail.com> (raw)
In-Reply-To: <4ABFD1F4.8080606@gmail.com>

Hi,

On Sun, Sep 27, 2009 at 22:58, Matthieu Dubuget
<matthieu.dubuget@gmail.com> wrote:
> Hello,
>
> I'm trying to have bin-prot compiled with mingw version of OCaml with
> the original OCamlMakefile.
>
> This fails on my computer.
>
> I reproduced the problem here:
>
> On linux, there is no problem:
>
> On cygwin:
> $ uname
> CYGWIN_NT-5.1
> $ echo $BIN_PROT_CPP
> cpp
> $ echo $pp
> $BIN_PROT_CPP $ARCH_FLAGS
> $ ocamlc -c -verbose -pp "echo $pp && $pp" write_ml.ml
> + echo $BIN_PROT_CPP $ARCH_FLAGS && $BIN_PROT_CPP $ARCH_FLAGS
> "write_ml.ml" > c:\DOCUME~1\matt\LOCALS~1\Temp\camlpp8a6978
> $BIN_PROT_CPP $ARCH_FLAGS
> '$BIN_PROT_CPP' n'est pas reconnu en tant que commande interne
> ou externe, un programme excutable ou un fichier de commandes.
> File "write_ml.ml", line 1, characters 0-1:
> Error: Preprocessor error
>
> It seems that when the pre-processor is called, the environment is not
> given to the sub-process?
>
> Can anybody reproduce this problem (or better: provide a solution), or
> did I something bad?

what ocaml-win32 port are you using exactly ? This looks like the
mingw (or MSVC) port because the error message you get looks like one
from CMD.EXE, the Windows shell. The cygwin port uses cygwin's sh
whereas the mingw/msvc port use cmd.exe.

You'll have to use cmd.exe's syntax for environment variable
expansion: %BIN_PROT_CPP% I believe.

HTH,
-- 
  Olivier


      reply	other threads:[~2009-09-28  8:33 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-09-27 20:58 Matthieu Dubuget
2009-09-28  8:33 ` Olivier Andrieu [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=95513600909280133i4325743nba48d1fddaa5fe50@mail.gmail.com \
    --to=oandrieu@nerim.net \
    --cc=caml-list@yquem.inria.fr \
    --cc=matthieu.dubuget@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).